home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-04-29 | 15.6 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
20%
| dexvert
| VertiZontal Interlacing (image/vzi)
| fileSize
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Apr 29 11:15:17 1996, modified Mon Apr 29 11:15:17 1996, creator 'CWIE', type ASCII, 15297 bytes "PathWalking.c" , at 0x3c41 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 50 61 74 68 57 61 | 6c 6b 69 6e 67 2e 63 00 |..PathWa|lking.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 3b c1 00 | 00 01 9a ad aa 8d 85 ad |.....;..|........|
|00000060| aa 8d 85 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e7 7b 00 00 |........|.....{..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 0d |********|*******.|
|000000c0| 0d 09 46 69 6c 65 3a 09 | 50 61 74 68 57 61 6c 6b |..File:.|PathWalk|
|000000d0| 69 6e 67 2e 63 0d 09 0d | 0d 09 43 6f 70 79 72 69 |ing.c...|..Copyri|
|000000e0| 67 68 74 20 a9 2c 20 31 | 39 39 36 2c 20 41 70 70 |ght ., 1|996, App|
|000000f0| 6c 65 20 43 6f 6d 70 75 | 74 65 72 20 49 6e 63 2e |le Compu|ter Inc.|
|00000100| 0d 09 09 09 44 61 6e 69 | 65 6c 20 49 2e 20 4c 69 |....Dani|el I. Li|
|00000110| 70 74 6f 6e 0d 0d 09 54 | 68 69 73 20 66 69 6c 65 |pton...T|his file|
|00000120| 20 63 6f 6e 74 61 69 6e | 73 20 72 6f 75 74 69 6e | contain|s routin|
|00000130| 65 73 20 6e 65 63 65 73 | 73 61 72 79 20 74 6f 20 |es neces|sary to |
|00000140| 69 6d 70 6c 65 6d 65 6e | 74 20 74 68 65 20 73 68 |implemen|t the sh|
|00000150| 61 70 65 0d 09 77 61 6c | 6b 69 6e 67 20 6c 69 62 |ape..wal|king lib|
|00000160| 72 61 72 79 2e 20 20 54 | 68 69 73 20 6c 69 62 72 |rary. T|his libr|
|00000170| 61 72 79 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |ary can |be used |
|00000180| 66 6f 72 20 74 72 61 76 | 65 72 73 69 6e 67 20 6f |for trav|ersing o|
|00000190| 66 20 0d 09 6c 69 6e 65 | 20 61 6e 64 20 63 75 72 |f ..line| and cur|
|000001a0| 76 65 20 73 65 67 6d 65 | 6e 74 73 20 69 6e 20 73 |ve segme|nts in s|
|000001b0| 68 61 70 65 73 2e 20 20 | 54 68 65 20 6c 69 62 72 |hapes. |The libr|
|000001c0| 61 72 79 20 69 73 20 63 | 61 6c 6c 62 61 63 6b 20 |ary is c|allback |
|000001d0| 0d 09 64 72 69 76 65 6e | 2e 20 20 57 61 6c 69 6e |..driven|. Walin|
|000001e0| 67 20 61 20 73 68 61 70 | 65 20 77 69 6c 6c 20 72 |g a shap|e will r|
|000001f0| 65 73 75 6c 74 20 69 6e | 20 63 61 6c 6c 62 61 63 |esult in| callbac|
|00000200| 6b 73 20 66 6f 72 20 65 | 61 63 68 20 73 65 67 6d |ks for e|ach segm|
|00000210| 65 6e 74 2e 0d 09 0d 09 | 09 4d 6f 76 65 74 6f 20 |ent.....|.Moveto |
|00000220| 63 61 6c 6c 62 61 63 6b | 3a 09 09 09 63 68 61 6e |callback|:...chan|
|00000230| 67 65 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ges the |current |
|00000240| 70 6f 69 6e 74 2c 20 63 | 61 6c 6c 65 64 20 61 74 |point, c|alled at|
|00000250| 20 73 74 61 72 74 20 6f | 66 20 6e 65 77 20 63 6f | start o|f new co|
|00000260| 6e 74 6f 75 72 2e 0d 09 | 09 4c 69 6e 65 74 6f 20 |ntour...|.Lineto |
|00000270| 63 61 6c 6c 62 61 63 6b | 3a 09 09 09 61 20 6c 69 |callback|:...a li|
|00000280| 6e 65 20 73 65 67 6d 65 | 6e 74 20 66 72 6f 6d 20 |ne segme|nt from |
|00000290| 63 75 72 72 65 6e 74 20 | 70 6f 69 6e 74 20 74 6f |current |point to|
|000002a0| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 70 | the spe|cified p|
|000002b0| 6f 69 6e 74 2e 0d 09 09 | 43 75 72 76 65 74 6f 20 |oint....|Curveto |
|000002c0| 63 61 6c 6c 62 61 63 6b | 3a 09 09 09 61 20 63 75 |callback|:...a cu|
|000002d0| 72 76 65 20 73 65 67 6d | 65 6e 74 2c 20 73 70 65 |rve segm|ent, spe|
|000002e0| 63 69 66 69 65 64 20 62 | 79 20 74 68 65 20 33 20 |cified b|y the 3 |
|000002f0| 70 6f 69 6e 74 73 2e 20 | 20 54 68 65 20 31 73 74 |points. | The 1st|
|00000300| 20 6f 66 20 74 68 65 20 | 74 68 72 65 65 0d 09 09 | of the |three...|
|00000310| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 77 69 6c |........|.....wil|
|00000320| 6c 20 62 65 20 74 68 65 | 20 63 75 72 72 65 6e 74 |l be the| current|
|00000330| 20 70 6f 69 6e 74 2c 20 | 62 75 74 20 61 6c 6c 20 | point, |but all |
|00000340| 74 68 72 65 65 20 61 72 | 65 20 70 61 73 73 65 64 |three ar|e passed|
|00000350| 20 61 6e 79 77 61 79 2e | 0d 09 09 43 6c 6f 73 65 | anyway.|...Close|
|00000360| 70 61 74 68 20 63 61 6c | 6c 62 61 63 6b 3a 09 09 |path cal|lback:..|
|00000370| 43 61 6c 6c 65 64 20 66 | 6f 72 20 65 61 63 68 20 |Called f|or each |
|00000380| 63 6f 6e 74 6f 75 72 20 | 6f 66 20 61 20 63 6c 6f |contour |of a clo|
|00000390| 73 65 64 20 73 68 61 70 | 65 2e 20 28 67 78 43 6c |sed shap|e. (gxCl|
|000003a0| 6f 73 65 46 72 61 6d 65 | 46 69 6c 6c 29 0d 09 09 |oseFrame|Fill)...|
|000003b0| 0d 09 09 65 61 63 68 20 | 63 61 6c 6c 62 61 63 6b |...each |callback|
|000003c0| 20 67 65 74 73 20 74 68 | 65 20 72 65 66 63 6f 6e | gets th|e refcon|
|000003d0| 20 70 61 73 73 65 64 20 | 69 6e 74 6f 20 74 68 65 | passed |into the|
|000003e0| 20 53 68 61 70 65 57 61 | 6c 6b 65 72 20 63 61 6c | ShapeWa|lker cal|
|000003f0| 6c 2e 0d 09 09 54 68 69 | 73 20 72 65 66 63 6f 6e |l....Thi|s refcon|
|00000400| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 66 6f 72 | can be |used for|
|00000410| 20 6d 61 69 6e 74 61 69 | 6e 69 6e 67 20 73 74 61 | maintai|ning sta|
|00000420| 74 65 20 6e 65 63 65 73 | 73 61 72 79 20 66 6f 72 |te neces|sary for|
|00000430| 20 63 6c 69 65 6e 74 27 | 73 20 75 73 65 0d 09 09 | client'|s use...|
|00000440| 6f 66 20 74 68 65 20 73 | 68 61 70 65 20 77 61 6c |of the s|hape wal|
|00000450| 6b 69 6e 67 20 6c 69 62 | 72 61 61 72 79 2e 20 20 |king lib|raary. |
|00000460| 49 74 20 69 73 20 72 65 | 63 63 6f 6d 65 6e 64 65 |It is re|ccomende|
|00000470| 64 20 74 68 61 74 20 74 | 68 65 20 63 6c 69 65 6e |d that t|he clien|
|00000480| 74 20 75 73 65 20 61 20 | 70 6f 69 6e 74 65 72 20 |t use a |pointer |
|00000490| 74 6f 20 61 0d 09 09 73 | 74 72 75 63 74 75 72 65 |to a...s|tructure|
|000004a0| 20 74 68 61 74 20 61 74 | 20 6c 65 61 73 74 20 63 | that at| least c|
|000004b0| 6f 6e 74 61 69 6e 73 20 | 61 6e 64 20 6d 61 69 6e |ontains |and main|
|000004c0| 74 61 69 6e 73 20 74 68 | 65 20 63 75 72 72 65 6e |tains th|e curren|
|000004d0| 74 20 70 6f 69 6e 74 2e | 20 20 54 68 69 73 20 63 |t point.| This c|
|000004e0| 75 72 72 65 6e 74 20 70 | 6f 69 6e 74 0d 09 09 77 |urrent p|oint...w|
|000004f0| 6f 75 6c 64 20 67 65 74 | 20 75 70 64 61 74 65 64 |ould get| updated|
|00000500| 20 69 6e 20 65 61 63 68 | 20 6f 66 20 74 68 65 20 | in each| of the |
|00000510| 63 61 6c 6c 62 61 6b 64 | 73 2e 0d 09 09 0d 09 09 |callbakd|s.......|
|00000520| 54 68 65 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 |The retu|rn value|
|00000530| 20 66 72 6f 6d 20 74 68 | 65 20 63 61 6c 6c 62 61 | from th|e callba|
|00000540| 63 6b 73 20 69 73 20 61 | 20 62 6f 6f 6c 65 61 6e |cks is a| boolean|
|00000550| 20 69 6e 64 69 63 61 74 | 69 6e 67 20 77 68 65 74 | indicat|ing whet|
|00000560| 68 65 72 20 6f 72 20 6e | 6f 74 20 74 6f 20 73 74 |her or n|ot to st|
|00000570| 6f 70 20 65 61 72 6c 79 | 2e 0d 09 09 52 65 74 75 |op early|....Retu|
|00000580| 72 6e 69 6e 67 20 66 61 | 6c 73 65 20 77 69 6c 6c |rning fa|lse will|
|00000590| 20 72 65 73 75 6c 74 20 | 69 6e 20 74 68 65 20 50 | result |in the P|
|000005a0| 61 74 68 57 61 6c 6b 65 | 72 20 72 6f 75 74 69 6e |athWalke|r routin|
|000005b0| 65 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 20 74 72 |e to con|tinue tr|
|000005c0| 61 76 65 72 73 69 6e 67 | 2e 20 20 72 65 74 75 72 |aversing|. retur|
|000005d0| 6e 69 6e 67 0d 09 09 74 | 72 75 65 20 77 69 6c 6c |ning...t|rue will|
|000005e0| 20 63 61 75 73 65 20 74 | 65 72 6d 69 6e 61 74 69 | cause t|erminati|
|000005f0| 6f 6e 20 65 61 72 6c 79 | 2e 0d 0d 09 09 09 0d 0d |on early|........|
|00000600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000620| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000630| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00000640| 0d 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 54 79 70 |...#incl|ude "Typ|
|00000650| 65 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |es.h".#i|nclude "|
|00000660| 47 58 54 79 70 65 73 2e | 68 22 0d 23 69 6e 63 6c |GXTypes.|h".#incl|
|00000670| 75 64 65 20 22 47 58 4d | 61 74 68 2e 68 22 0d 23 |ude "GXM|ath.h".#|
|00000680| 69 6e 63 6c 75 64 65 20 | 22 47 58 47 72 61 70 68 |include |"GXGraph|
|00000690| 69 63 73 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ics.h".#|include |
|000006a0| 22 47 58 4c 61 79 6f 75 | 74 2e 68 22 0d 23 69 6e |"GXLayou|t.h".#in|
|000006b0| 63 6c 75 64 65 20 22 47 | 58 45 78 63 65 70 74 69 |clude "G|XExcepti|
|000006c0| 6f 6e 73 2e 68 22 0d 0d | 23 69 6e 63 6c 75 64 65 |ons.h"..|#include|
|000006d0| 20 22 50 61 74 68 57 61 | 6c 6b 69 6e 67 2e 68 22 | "PathWa|lking.h"|
|000006e0| 0d 0d 0d 0d 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..../***|********|
|000006f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000700| 2a 0d 09 4e 45 58 54 42 | 49 54 2c 20 50 52 45 56 |*..NEXTB|IT, PREV|
|00000710| 42 49 54 3a 0d 09 55 73 | 65 64 20 66 6f 72 20 74 |BIT:..Us|ed for t|
|00000720| 72 61 6e 76 65 72 73 61 | 6c 20 6f 66 20 62 69 74 |ranversa|l of bit|
|00000730| 20 61 72 72 61 79 73 2e | 0d 09 0d 09 74 68 65 42 | arrays.|....theB|
|00000740| 69 74 3a 09 09 09 09 42 | 6f 6f 6c 65 61 6e 2c 20 |it:....B|oolean, |
|00000750| 74 72 75 65 20 69 66 20 | 62 69 74 20 77 61 73 20 |true if |bit was |
|00000760| 73 65 74 2e 0d 09 74 68 | 65 4c 6f 6e 67 3a 09 09 |set...th|eLong:..|
|00000770| 09 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 |.pointer| to the |
|00000780| 63 75 72 72 65 6e 74 20 | 6c 6f 6e 67 77 6f 72 64 |current |longword|
|00000790| 20 69 6e 20 62 69 74 20 | 61 72 72 61 79 2e 0d 09 | in bit |array...|
|000007a0| 74 68 65 4d 61 73 6b 3a | 09 09 09 63 75 72 72 65 |theMask:|...curre|
|000007b0| 6e 74 20 6c 6f 6e 67 20 | 77 6f 72 64 20 6d 61 73 |nt long |word mas|
|000007c0| 6b 2e 20 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 74 |k. Init|ialize t|
|000007d0| 6f 20 30 78 38 30 30 30 | 30 30 30 30 20 66 6f 72 |o 0x8000|0000 for|
|000007e0| 20 66 69 72 73 74 20 62 | 69 74 20 69 6e 20 61 72 | first b|it in ar|
|000007f0| 72 61 79 2e 0d 09 0d 09 | 4e 45 58 54 42 49 54 20 |ray.....|NEXTBIT |
|00000800| 43 68 65 63 6b 73 20 63 | 75 72 72 65 6e 74 20 62 |Checks c|urrent b|
|00000810| 69 74 20 61 6e 64 20 74 | 68 65 6e 20 61 64 76 61 |it and t|hen adva|
|00000820| 6e 63 65 73 20 6d 61 73 | 6b 0d 09 50 52 45 56 42 |nces mas|k..PREVB|
|00000830| 49 54 20 72 6f 6c 6c 73 | 20 62 61 63 6b 20 6d 61 |IT rolls| back ma|
|00000840| 73 6b 20 61 6e 64 20 74 | 68 65 6e 20 63 68 65 63 |sk and t|hen chec|
|00000850| 6b 73 20 62 69 74 2e 0d | 09 0d 2a 2a 2a 2a 2a 2a |ks bit..|..******|
|00000860| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000870| 2a 2a 2a 2a 2a 2a 2a 2f | 0d 23 64 65 66 69 6e 65 |*******/|.#define|
|00000880| 20 4e 45 58 54 42 49 54 | 28 74 68 65 42 69 74 2c | NEXTBIT|(theBit,|
|00000890| 20 74 68 65 4c 6f 6e 67 | 2c 20 74 68 65 4d 61 73 | theLong|, theMas|
|000008a0| 6b 29 20 20 7b 5c 0d 09 | 09 09 09 09 09 09 09 09 |k) {\..|........|
|000008b0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 74 68 |........|......th|
|000008c0| 65 42 69 74 20 3d 20 28 | 28 2a 74 68 65 4c 6f 6e |eBit = (|(*theLon|
|000008d0| 67 20 26 20 74 68 65 4d | 61 73 6b 29 20 21 3d 20 |g & theM|ask) != |
|000008e0| 30 29 3b 20 5c 0d 09 09 | 09 09 09 09 09 09 09 09 |0); \...|........|
|000008f0| 09 09 09 09 09 09 09 09 | 09 09 09 20 09 09 69 66 |........|... ..if|
|00000900| 20 28 21 28 74 68 65 4d | 61 73 6b 3e 3e 3d 31 29 | (!(theM|ask>>=1)|
|00000910| 29 20 5c 0d 09 09 09 09 | 09 09 09 09 09 09 09 09 |) \.....|........|
|00000920| 09 09 09 09 09 09 09 09 | 09 09 09 09 7b 74 68 65 |........|....{the|
|00000930| 4d 61 73 6b 20 3d 20 30 | 78 38 30 30 30 30 30 30 |Mask = 0|x8000000|
|00000940| 30 3b 20 2b 2b 74 68 65 | 4c 6f 6e 67 3b 7d 20 5c |0; ++the|Long;} \|
|00000950| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000960| 09 09 09 09 09 09 09 7d | 0d 0d 23 64 65 66 69 6e |.......}|..#defin|
|00000970| 65 20 50 52 45 56 42 49 | 54 28 74 68 65 42 69 74 |e PREVBI|T(theBit|
|00000980| 2c 20 74 68 65 4c 6f 6e | 67 2c 20 74 68 65 4d 61 |, theLon|g, theMa|
|00000990| 73 6b 29 20 7b 5c 0d 09 | 09 09 09 09 09 09 09 09 |sk) {\..|........|
|000009a0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 69 66 20 |........|.....if |
|000009b0| 28 21 28 74 68 65 4d 61 | 73 6b 3c 3c 31 29 29 20 |(!(theMa|sk<<1)) |
|000009c0| 5c 0d 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |\.......|........|
|000009d0| 09 09 09 09 09 09 09 09 | 09 7b 74 68 65 4d 61 73 |........|.{theMas|
|000009e0| 6b 20 3d 20 30 78 30 30 | 30 30 30 30 30 31 3b 20 |k = 0x00|000001; |
|000009f0| 2d 2d 74 68 65 4c 6f 6e | 67 3b 7d 20 5c 0d 09 09 |--theLon|g;} \...|
|00000a00| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000a10| 09 09 09 09 74 68 65 42 | 69 74 20 3d 20 28 28 2a |....theB|it = ((*|
|00000a20| 74 68 65 4c 6f 6e 67 20 | 26 20 74 68 65 4d 61 73 |theLong |& theMas|
|00000a30| 6b 29 20 21 3d 20 30 29 | 3b 20 5c 0d 09 09 09 09 |k) != 0)|; \.....|
|00000a40| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000a50| 09 7d 0d 0d 0d 0d 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.}..../*|********|
|00000a60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 0d |********|*******.|
|00000a80| 09 4d 61 63 72 6f 20 74 | 6f 20 69 6e 74 65 72 70 |.Macro t|o interp|
|00000a90| 6f 6c 61 74 65 20 62 65 | 74 77 65 65 6e 20 74 77 |olate be|tween tw|
|00000aa0| 6f 20 70 6f 69 6e 74 73 | 2e 0d 09 0d 09 70 3a 09 |o points|.....p:.|
|00000ab0| 09 09 54 68 65 20 70 6f | 69 6e 74 20 74 68 61 74 |..The po|int that|
|00000ac0| 20 77 69 6c 6c 20 67 65 | 74 20 74 68 65 20 72 65 | will ge|t the re|
|00000ad0| 73 75 6c 74 2e 0d 09 70 | 31 3a 09 09 09 54 68 65 |sult...p|1:...The|
|00000ae0| 20 66 69 72 73 74 20 70 | 6f 69 6e 74 20 74 6f 20 | first p|oint to |
|00000af0| 69 6e 74 65 72 70 6f 6c | 61 74 65 20 62 65 74 77 |interpol|ate betw|
|00000b00| 65 65 6e 0d 09 70 32 3a | 09 09 09 54 68 65 20 73 |een..p2:|...The s|
|00000b10| 65 63 6f 6e 64 20 70 6f | 69 6e 74 20 74 6f 20 69 |econd po|int to i|
|00000b20| 6e 74 65 72 70 6f 6c 61 | 74 65 20 62 65 74 77 65 |nterpola|te betwe|
|00000b30| 65 6e 0d 09 0d 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |en...***|********|
|00000b40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0d |********|******/.|
|00000b60| 09 0d 2f 2f 20 43 6f 64 | 65 20 74 6f 20 61 76 65 |..// Cod|e to ave|
|00000b70| 72 61 67 65 20 74 77 6f | 20 66 69 78 65 64 20 70 |rage two| fixed p|
|00000b80| 6f 69 6e 74 20 6e 75 6d | 62 65 72 73 2e 20 20 54 |oint num|bers. T|
|00000b90| 61 6b 65 6e 20 66 72 6f | 6d 20 47 58 20 66 69 6c |aken fro|m GX fil|
|00000ba0| 65 20 22 70 61 74 68 73 | 2e 68 22 20 20 44 6f 65 |e "paths|.h" Doe|
|00000bb0| 73 20 6d 61 74 68 20 69 | 6e 20 33 33 20 62 69 74 |s math i|n 33 bit|
|00000bc0| 73 2e 0d 73 74 61 74 69 | 63 20 6c 6f 6e 67 20 41 |s..stati|c long A|
|00000bd0| 76 65 72 61 67 65 28 72 | 65 67 69 73 74 65 72 20 |verage(r|egister |
|00000be0| 6c 6f 6e 67 20 78 2c 20 | 72 65 67 69 73 74 65 72 |long x, |register|
|00000bf0| 20 6c 6f 6e 67 20 79 29 | 20 0d 09 7b 20 0d 09 09 | long y)| ..{ ...|
|00000c00| 72 65 74 75 72 6e 20 28 | 78 20 3e 3e 20 31 29 20 |return (|x >> 1) |
|00000c10| 2b 20 28 79 20 3e 3e 20 | 31 29 20 2b 20 28 28 78 |+ (y >> |1) + ((x|
|00000c20| 20 26 20 79 29 20 26 20 | 31 29 3b 0d 09 7d 0d 0d | & y) & |1);..}..|
|00000c30| 0d 2f 2a 20 4d 61 63 72 | 6f 20 74 6f 20 69 6e 74 |./* Macr|o to int|
|00000c40| 65 72 70 6f 6c 61 74 65 | 20 74 68 65 20 70 6f 69 |erpolate| the poi|
|00000c50| 6e 74 20 70 20 77 68 69 | 63 68 20 77 69 6c 6c 20 |nt p whi|ch will |
|00000c60| 62 65 20 63 65 6e 74 65 | 72 65 64 20 62 65 74 77 |be cente|red betw|
|00000c70| 65 65 6e 20 70 31 20 61 | 6e 64 20 70 32 20 2a 2f |een p1 a|nd p2 */|
|00000c80| 0d 0d 23 64 65 66 69 6e | 65 20 49 4e 54 45 52 50 |..#defin|e INTERP|
|00000c90| 50 4f 49 4e 54 28 70 2c | 20 70 31 2c 20 70 32 29 |POINT(p,| p1, p2)|
|00000ca0| 20 7b 5c 0d 09 09 09 09 | 09 09 09 09 09 09 09 09 | {\.....|........|
|00000cb0| 09 09 09 09 09 28 70 29 | 2e 78 20 3d 20 41 76 65 |.....(p)|.x = Ave|
|00000cc0| 72 61 67 65 28 20 28 70 | 31 29 2e 78 2c 20 28 70 |rage( (p|1).x, (p|
|00000cd0| 32 29 2e 78 29 20 3b 20 | 5c 0d 09 09 09 09 09 09 |2).x) ; |\.......|
|00000ce0| 09 09 09 09 09 09 09 09 | 09 09 09 28 70 29 2e 79 |........|...(p).y|
|00000cf0| 20 3d 20 41 76 65 72 61 | 67 65 28 20 28 70 31 29 | = Avera|ge( (p1)|
|00000d00| 2e 79 2c 20 28 70 32 29 | 2e 79 29 20 3b 20 5c 0d |.y, (p2)|.y) ; \.|
|00000d10| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 20 |........|....... |
|00000d20| 7d 0d 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |}.......|........|
|00000d30| 09 09 0d 0d 0d 0d 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |....../*|********|
|00000d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0d 09 50 61 74 68 |********|**..Path|
|00000d60| 57 61 6c 6b 65 72 3a 0d | 09 0d 09 57 61 6c 6b 20 |Walker:.|...Walk |
|00000d70| 61 20 70 61 74 68 20 73 | 68 61 70 65 2c 20 63 61 |a path s|hape, ca|
|00000d80| 6c 6c 20 62 61 63 6b 20 | 77 69 74 68 20 65 61 63 |ll back |with eac|
|00000d90| 68 20 73 65 67 6d 65 6e | 74 2e 0d 09 54 68 65 20 |h segmen|t...The |
|00000da0| 70 6f 69 6e 74 73 20 73 | 65 6e 74 20 74 68 72 6f |points s|ent thro|
|00000db0| 75 67 68 20 74 68 65 20 | 63 61 6c 6c 62 61 63 6b |ugh the |callback|
|00000dc0| 73 20 77 69 6c 6c 20 69 | 6e 63 6c 75 64 65 0d 09 |s will i|nclude..|
|00000dd0| 61 6e 79 20 69 6d 70 6c | 69 63 69 74 20 70 6f 69 |any impl|icit poi|
|00000de0| 6e 74 73 20 69 6e 20 74 | 68 65 20 70 61 74 68 20 |nts in t|he path |
|00000df0| 64 65 74 65 72 6d 69 6e | 65 64 20 62 79 20 63 6f |determin|ed by co|
|00000e00| 6e 73 65 63 75 74 69 76 | 65 0d 09 6f 66 66 20 63 |nsecutiv|e..off c|
|00000e10| 75 72 76 65 20 70 6f 69 | 6e 74 73 2e 0d 09 0d 09 |urve poi|nts.....|
|00000e20| 74 68 65 53 68 61 70 65 | 3a 09 09 09 09 09 74 68 |theShape|:.....th|
|00000e30| 65 20 70 61 74 68 20 73 | 68 61 70 65 20 74 6f 20 |e path s|hape to |
|00000e40| 77 61 6c 6b 2e 0d 09 44 | 6f 4d 6f 76 65 74 6f 3a |walk...D|oMoveto:|
|00000e50| 09 09 09 09 09 63 61 6c | 6c 20 62 61 63 6b 20 66 |.....cal|l back f|
|00000e60| 75 6e 63 74 69 6f 6e 20 | 66 6f 72 20 73 65 74 74 |unction |for sett|
|00000e70| 69 6e 67 20 63 75 72 72 | 65 6e 74 20 70 6f 69 6e |ing curr|ent poin|
|00000e80| 74 2e 0d 09 44 6f 4c 69 | 6e 65 74 6f 3a 09 09 09 |t...DoLi|neto:...|
|00000e90| 09 09 63 61 6c 6c 20 62 | 61 63 6b 20 66 75 6e 63 |..call b|ack func|
|00000ea0| 74 69 6f 6e 20 66 6f 72 | 20 61 20 6c 69 6e 65 20 |tion for| a line |
|00000eb0| 73 65 67 6d 65 6e 74 2e | 0d 09 44 6f 43 75 72 76 |segment.|..DoCurv|
|00000ec0| 65 74 6f 3a 09 09 09 09 | 63 61 6c 6c 20 62 61 63 |eto:....|call bac|
|00000ed0| 6b 20 66 75 6e 63 74 69 | 6f 6e 20 66 6f 72 20 61 |k functi|on for a|
|00000ee0| 20 63 75 72 76 65 20 73 | 65 67 6d 65 6e 74 2e 0d | curve s|egment..|
|00000ef0| 09 44 6f 43 6c 6f 73 65 | 70 61 74 68 3a 09 09 09 |.DoClose|path:...|
|00000f00| 63 61 6c 6c 20 62 61 63 | 6b 20 66 75 6e 63 74 69 |call bac|k functi|
|00000f10| 6f 6e 20 66 6f 72 20 63 | 6c 6f 73 69 6e 67 20 74 |on for c|losing t|
|00000f20| 68 65 20 70 61 74 68 2e | 0d 09 72 65 66 63 6f 6e |he path.|..refcon|
|00000f30| 3a 09 09 09 09 09 09 74 | 68 69 73 20 77 69 6c 6c |:......t|his will|
|00000f40| 20 67 65 74 20 70 61 73 | 73 65 64 20 74 6f 20 79 | get pas|sed to y|
|00000f50| 6f 75 72 20 63 61 6c 6c | 62 61 63 6b 73 2e 0d 09 |our call|backs...|
|00000f60| 0d 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*******|********|
|00000f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f80| 2a 2a 2a 2a 2a 2a 2f 0d | 42 6f 6f 6c 65 61 6e 20 |******/.|Boolean |
|00000f90| 50 61 74 68 57 61 6c 6b | 65 72 28 67 78 53 68 61 |PathWalk|er(gxSha|
|00000fa0| 70 65 20 74 68 65 53 68 | 61 70 65 2c 20 54 70 77 |pe theSh|ape, Tpw|
|00000fb0| 4d 6f 76 65 74 6f 50 72 | 6f 63 20 44 6f 4d 6f 76 |MovetoPr|oc DoMov|
|00000fc0| 65 74 6f 2c 20 54 70 77 | 4c 69 6e 65 74 6f 50 72 |eto, Tpw|LinetoPr|
|00000fd0| 6f 63 20 44 6f 4c 69 6e | 65 74 6f 2c 20 54 70 77 |oc DoLin|eto, Tpw|
|00000fe0| 43 75 72 76 65 74 6f 50 | 72 6f 63 20 44 6f 43 75 |CurvetoP|roc DoCu|
|00000ff0| 72 76 65 74 6f 2c 20 54 | 70 77 43 6c 6f 73 65 70 |rveto, T|pwClosep|
|00001000| 61 74 68 50 72 6f 63 20 | 44 6f 43 6c 6f 73 65 70 |athProc |DoClosep|
|00001010| 61 74 68 2c 20 76 6f 69 | 64 2a 20 72 65 66 63 6f |ath, voi|d* refco|
|00001020| 6e 29 3b 0d 42 6f 6f 6c | 65 61 6e 20 50 61 74 68 |n);.Bool|ean Path|
|00001030| 57 61 6c 6b 65 72 28 67 | 78 53 68 61 70 65 20 74 |Walker(g|xShape t|
|00001040| 68 65 53 68 61 70 65 2c | 20 54 70 77 4d 6f 76 65 |heShape,| TpwMove|
|00001050| 74 6f 50 72 6f 63 20 44 | 6f 4d 6f 76 65 74 6f 2c |toProc D|oMoveto,|
|00001060| 20 54 70 77 4c 69 6e 65 | 74 6f 50 72 6f 63 20 44 | TpwLine|toProc D|
|00001070| 6f 4c 69 6e 65 74 6f 2c | 20 54 70 77 43 75 72 76 |oLineto,| TpwCurv|
|00001080| 65 74 6f 50 72 6f 63 20 | 44 6f 43 75 72 76 65 74 |etoProc |DoCurvet|
|00001090| 6f 2c 20 54 70 77 43 6c | 6f 73 65 70 61 74 68 50 |o, TpwCl|osepathP|
|000010a0| 72 6f 63 20 44 6f 43 6c | 6f 73 65 70 61 74 68 2c |roc DoCl|osepath,|
|000010b0| 20 76 6f 69 64 2a 20 72 | 65 66 63 6f 6e 29 0d 09 | void* r|efcon)..|
|000010c0| 7b 0d 09 09 42 6f 6f 6c | 65 61 6e 09 09 09 09 09 |{...Bool|ean.....|
|000010d0| 09 09 09 09 09 09 09 73 | 74 61 74 75 73 3b 0d 09 |.......s|tatus;..|
|000010e0| 09 50 74 72 09 09 09 09 | 09 09 09 09 09 09 09 09 |.Ptr....|........|
|000010f0| 09 09 69 6e 50 61 74 68 | 3b 09 09 09 09 09 09 09 |..inPath|;.......|
|00001100| 2f 2f 20 57 65 20 6d 75 | 73 74 20 77 61 6c 6b 20 |// We mu|st walk |
|00001110| 74 68 72 6f 75 67 68 20 | 74 68 65 20 50 61 74 68 |through |the Path|
|00001120| 73 20 73 74 72 75 63 74 | 75 72 65 0d 09 09 67 78 |s struct|ure...gx|
|00001130| 53 68 61 70 65 41 74 74 | 72 69 62 75 74 65 09 09 |ShapeAtt|ribute..|
|00001140| 09 09 09 09 09 74 68 65 | 41 74 74 72 69 62 75 74 |.....the|Attribut|
|00001150| 65 73 3b 0d 09 09 6c 6f | 6e 67 09 09 09 09 09 09 |es;...lo|ng......|
|00001160| 09 09 09 09 09 09 09 69 | 2c 20 70 6f 69 6e 74 49 |.......i|, pointI|
|00001170| 6e 64 65 78 3b 0d 09 09 | 6c 6f 6e 67 09 09 09 09 |ndex;...|long....|
|00001180| 09 09 09 09 09 09 09 09 | 09 73 69 7a 65 3b 0d 09 |........|.size;..|
|00001190| 09 6c 6f 6e 67 09 09 09 | 09 09 09 09 09 09 09 09 |.long...|........|
|000011a0| 09 09 66 69 72 73 74 49 | 6e 64 65 78 2c 20 6c 61 |..firstI|ndex, la|
|000011b0| 73 74 49 6e 64 65 78 3b | 09 2f 2f 20 49 6e 64 65 |stIndex;|.// Inde|
|000011c0| 78 20 6f 66 20 66 69 72 | 73 74 20 61 6e 64 20 6c |x of fir|st and l|
|000011d0| 61 73 74 20 70 6f 69 6e | 74 20 4f 4e 20 63 75 72 |ast poin|t ON cur|
|000011e0| 76 65 2e 0d 09 09 42 6f | 6f 6c 65 61 6e 09 09 09 |ve....Bo|olean...|
|000011f0| 09 09 09 09 09 09 09 09 | 09 63 6c 6f 73 65 49 74 |........|.closeIt|
|00001200| 3b 09 09 09 09 09 09 09 | 09 2f 2f 20 49 73 20 69 |;.......|.// Is i|
|00001210| 74 20 6f 70 65 6e 20 6f | 72 20 63 6c 6f 73 65 64 |t open o|r closed|
|00001220| 2e 0d 09 09 6c 6f 6e 67 | 09 09 09 09 09 09 09 09 |....long|........|
|00001230| 09 09 09 09 09 6e 43 6f | 6e 74 6f 75 72 73 3b 09 |.....nCo|ntours;.|
|00001240| 09 09 09 09 09 09 2f 2f | 20 4e 75 6d 62 65 72 20 |......//| Number |
|00001250| 6f 66 20 63 6f 6e 74 6f | 75 72 73 2e 0d 09 09 6c |of conto|urs....l|
|00001260| 6f 6e 67 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |ong.....|........|
|00001270| 6e 50 6f 69 6e 74 73 3b | 09 09 09 09 09 09 09 09 |nPoints;|........|
|00001280| 2f 2f 20 4e 75 6d 62 65 | 72 20 6f 66 20 70 6f 69 |// Numbe|r of poi|
|00001290| 6e 74 73 20 69 6e 20 63 | 6f 6e 74 6f 75 72 2e 0d |nts in c|ontour..|
|000012a0| 09 09 67 78 50 6f 69 6e | 74 2a 09 09 09 09 09 09 |..gxPoin|t*......|
|000012b0| 09 09 09 09 09 70 50 6f | 69 6e 74 3b 09 09 09 09 |.....pPo|int;....|
|000012c0| 09 09 09 09 09 2f 2f 20 | 50 6f 69 6e 74 20 74 6f |.....// |Point to|
|000012d0| 20 61 20 70 6f 69 6e 74 | 2e 0d 09 09 67 78 50 6f | a point|....gxPo|
|000012e0| 69 6e 74 09 09 09 09 09 | 09 09 09 09 09 09 09 66 |int.....|.......f|
|000012f0| 69 72 73 74 50 6f 69 6e | 74 3b 09 09 09 09 09 09 |irstPoin|t;......|
|00001300| 09 2f 2f 20 46 69 72 73 | 74 20 70 6f 69 6e 74 20 |.// Firs|t point |
|00001310| 69 6e 20 74 68 65 20 63 | 6f 6e 74 6f 75 72 2e 0d |in the c|ontour..|
|00001320| 09 09 67 78 50 6f 69 6e | 74 09 09 09 09 09 09 09 |..gxPoin|t.......|
|00001330| 09 09 09 09 09 6c 61 73 | 74 50 6f 69 6e 74 3b 09 |.....las|tPoint;.|
|00001340| 09 09 09 09 09 09 2f 2f | 20 54 68 65 20 6c 61 73 |......//| The las|
|00001350| 74 20 70 6f 69 6e 74 20 | 77 65 20 6f 75 74 70 75 |t point |we outpu|
|00001360| 74 2e 0d 09 09 72 65 67 | 69 73 74 65 72 20 75 6e |t....reg|ister un|
|00001370| 73 69 67 6e 65 64 20 6c | 6f 6e 67 2a 09 09 09 09 |signed l|ong*....|
|00001380| 63 6f 6e 74 72 6f 6c 42 | 69 74 4c 6f 6e 67 3b 09 |controlB|itLong;.|
|00001390| 09 09 09 09 2f 2f 20 50 | 6f 69 6e 74 65 72 20 74 |....// P|ointer t|
|000013a0| 6f 20 63 6f 6e 74 72 6f | 6c 20 62 69 74 73 2e 0d |o contro|l bits..|
|000013b0| 09 09 72 65 67 69 73 74 | 65 72 20 75 6e 73 69 67 |..regist|er unsig|
|000013c0| 6e 65 64 20 6c 6f 6e 67 | 09 09 09 09 63 42 69 74 |ned long|....cBit|
|000013d0| 4d 61 73 6b 3b 09 09 09 | 09 09 09 09 09 2f 2f 20 |Mask;...|.....// |
|000013e0| 4d 61 73 6b 20 66 6f 72 | 20 72 65 61 64 69 6e 67 |Mask for| reading|
|000013f0| 20 63 6f 6e 74 72 6f 6c | 20 62 69 74 73 2e 0d 09 | control| bits...|
|00001400| 09 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 09 09 |.unsigne|d long..|
|00001410| 09 09 09 09 09 09 09 6c | 61 73 74 42 69 74 4d 61 |.......l|astBitMa|
|00001420| 73 6b 3b 09 09 09 09 09 | 09 2f 2f 20 4d 61 73 6b |sk;.....|.// Mask|
|00001430| 20 66 6f 72 20 6c 61 73 | 74 20 70 6f 69 6e 74 20 | for las|t point |
|00001440| 69 6e 20 63 6f 6e 74 6f | 75 72 2e 0d 09 09 6c 6f |in conto|ur....lo|
|00001450| 6e 67 09 09 09 09 09 09 | 09 09 09 09 09 09 09 63 |ng......|.......c|
|00001460| 42 69 74 53 69 7a 65 3b | 09 09 09 09 09 09 09 09 |BitSize;|........|
|00001470| 2f 2f 20 4e 75 6d 62 65 | 72 20 6f 66 20 6c 6f 6e |// Numbe|r of lon|
|00001480| 67 73 20 66 6f 72 20 63 | 6f 6e 74 72 6f 6c 20 62 |gs for c|ontrol b|
|00001490| 69 74 73 2e 0d 09 09 67 | 78 50 6f 69 6e 74 09 09 |its....g|xPoint..|
|000014a0| 09 09 09 09 09 09 09 09 | 09 09 71 5b 33 5d 3b 09 |........|..q[3];.|
|000014b0| 09 09 09 09 09 09 09 09 | 09 2f 2f 20 51 75 61 64 |........|.// Quad|
|000014c0| 72 61 74 69 63 20 63 6f | 6e 74 72 6f 6c 20 70 6f |ratic co|ntrol po|
|000014d0| 69 6e 74 73 2e 0d 09 09 | 73 68 6f 72 74 09 09 09 |ints....|short...|
|000014e0| 09 09 09 09 09 09 09 09 | 09 09 71 49 6e 64 65 78 |........|..qIndex|
|000014f0| 3b 09 09 09 09 09 09 09 | 09 09 2f 2f 20 49 6e 64 |;.......|..// Ind|
|00001500| 69 63 61 74 65 73 20 23 | 70 6f 69 6e 74 73 20 69 |icates #|points i|
|00001510| 6e 20 63 75 72 76 65 20 | 73 65 67 6d 65 6e 74 20 |n curve |segment |
|00001520| 73 6f 20 66 61 72 2e 0d | 09 09 42 6f 6f 6c 65 61 |so far..|..Boolea|
|00001530| 6e 09 09 09 09 09 09 09 | 09 09 09 09 09 69 73 4f |n.......|.....isO|
|00001540| 66 66 3b 09 09 09 09 09 | 09 09 09 09 2f 2f 20 4f |ff;.....|....// O|
|00001550| 6e 20 74 68 65 20 63 75 | 72 76 65 20 6f 72 20 6f |n the cu|rve or o|
|00001560| 66 66 20 74 68 65 20 63 | 75 72 76 65 2e 0d 09 09 |ff the c|urve....|
|00001570| 42 6f 6f 6c 65 61 6e 09 | 09 09 09 09 09 09 09 09 |Boolean.|........|
|00001580| 09 09 09 66 69 72 73 74 | 49 73 4f 6e 2c 20 6c 61 |...first|IsOn, la|
|00001590| 73 74 49 73 4f 6e 3b 0d | 09 09 09 09 0d 09 09 2f |stIsOn;.|......./|
|000015a0| 2a 20 49 66 20 69 74 20 | 69 73 20 63 6c 6f 73 65 |* If it |is close|
|000015b0| 64 46 72 61 6d 65 46 69 | 6c 6c 20 77 65 20 6d 75 |dFrameFi|ll we mu|
|000015c0| 73 74 20 63 6c 6f 73 65 | 20 65 61 63 68 20 63 6f |st close| each co|
|000015d0| 6e 74 6f 75 72 20 2a 2f | 0d 0d 09 09 63 6c 6f 73 |ntour */|....clos|
|000015e0| 65 49 74 20 3d 20 28 47 | 58 47 65 74 53 68 61 70 |eIt = (G|XGetShap|
|000015f0| 65 46 69 6c 6c 28 74 68 | 65 53 68 61 70 65 29 20 |eFill(th|eShape) |
|00001600| 3d 3d 20 67 78 43 6c 6f | 73 65 64 46 72 61 6d 65 |== gxClo|sedFrame|
|00001610| 46 69 6c 6c 29 3b 0d 09 | 09 0d 09 09 2f 2a 2a 2a |Fill);..|..../***|
|00001620| 2a 2a 2a 2a 2a 2a 2a 2a | 0d 09 09 09 4d 61 6b 65 |********|....Make|
|00001630| 20 73 75 72 65 20 77 65 | 20 68 61 76 65 20 61 63 | sure we| have ac|
|00001640| 63 65 73 73 20 74 6f 20 | 74 68 65 20 73 68 61 70 |cess to |the shap|
|00001650| 65 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |e data s|tructure|
|00001660| 2c 0d 09 09 09 61 6e 64 | 20 74 68 65 6e 20 67 65 |,....and| then ge|
|00001670| 74 20 69 74 0d 09 09 2a | 2a 2a 2a 2a 2a 2a 2a 2a |t it...*|********|
|00001680| 2a 2a 2f 09 09 0d 09 09 | 74 68 65 41 74 74 72 69 |**/.....|theAttri|
|00001690| 62 75 74 65 73 20 3d 20 | 47 58 47 65 74 53 68 61 |butes = |GXGetSha|
|000016a0| 70 65 41 74 74 72 69 62 | 75 74 65 73 28 74 68 65 |peAttrib|utes(the|
|000016b0| 53 68 61 70 65 29 3b 0d | 09 09 47 58 53 65 74 53 |Shape);.|..GXSetS|
|000016c0| 68 61 70 65 41 74 74 72 | 69 62 75 74 65 73 28 74 |hapeAttr|ibutes(t|
|000016d0| 68 65 53 68 61 70 65 2c | 20 74 68 65 41 74 74 72 |heShape,| theAttr|
|000016e0| 69 62 75 74 65 73 20 7c | 20 67 78 44 69 72 65 63 |ibutes || gxDirec|
|000016f0| 74 53 68 61 70 65 29 3b | 0d 09 09 0d 09 09 47 58 |tShape);|......GX|
|00001700| 4c 6f 63 6b 53 68 61 70 | 65 28 74 68 65 53 68 61 |LockShap|e(theSha|
|00001710| 70 65 29 3b 0d 09 09 0d | 09 09 69 6e 50 61 74 68 |pe);....|..inPath|
|00001720| 20 3d 20 28 50 74 72 29 | 47 58 47 65 74 53 68 61 | = (Ptr)|GXGetSha|
|00001730| 70 65 53 74 72 75 63 74 | 75 72 65 28 74 68 65 53 |peStruct|ure(theS|
|00001740| 68 61 70 65 2c 20 26 73 | 69 7a 65 29 3b 09 09 09 |hape, &s|ize);...|
|00001750| 2f 2f 47 65 74 20 61 20 | 70 6f 69 6e 74 65 72 20 |//Get a |pointer |
|00001760| 74 6f 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |to the s|tructure|
|00001770| 2e 0d 09 09 63 68 65 63 | 6b 28 69 6e 50 61 74 68 |....chec|k(inPath|
|00001780| 29 3b 0d 09 09 09 09 0d | 09 09 6e 43 6f 6e 74 6f |);......|..nConto|
|00001790| 75 72 73 20 3d 20 28 28 | 67 78 50 61 74 68 73 2a |urs = ((|gxPaths*|
|000017a0| 29 69 6e 50 61 74 68 29 | 2d 3e 63 6f 6e 74 6f 75 |)inPath)|->contou|
|000017b0| 72 73 3b 09 09 09 09 09 | 09 09 2f 2f 47 65 74 20 |rs;.....|..//Get |
|000017c0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 6f |the numb|er of co|
|000017d0| 75 6e 74 6f 75 72 73 2e | 0d 09 09 69 6e 50 61 74 |untours.|...inPat|
|000017e0| 68 20 2b 3d 20 73 69 7a | 65 6f 66 28 6c 6f 6e 67 |h += siz|eof(long|
|000017f0| 29 3b 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |);......|........|
|00001800| 09 09 2f 2f 4d 6f 76 65 | 20 70 6f 69 6e 74 65 72 |..//Move| pointer|
|00001810| 20 70 61 73 74 20 63 6f | 6e 74 6f 75 72 73 20 66 | past co|ntours f|
|00001820| 69 65 6c 64 2e 0d 09 09 | 09 09 0d 09 09 73 74 61 |ield....|.....sta|
|00001830| 74 75 73 20 3d 20 47 58 | 47 65 74 47 72 61 70 68 |tus = GX|GetGraph|
|00001840| 69 63 73 45 72 72 6f 72 | 28 6e 69 6c 29 3b 0d 09 |icsError|(nil);..|
|00001850| 09 6e 72 65 71 75 69 72 | 65 28 73 74 61 74 75 73 |.nrequir|e(status|
|00001860| 2c 20 66 61 69 6c 65 64 | 5f 4b 65 65 70 44 69 72 |, failed|_KeepDir|
|00001870| 65 63 74 29 3b 0d 09 09 | 0d 09 09 2f 2a 2a 20 4e |ect);...|.../** N|
|00001880| 6f 77 20 6f 75 74 70 75 | 74 20 61 6c 6c 20 6f 66 |ow outpu|t all of|
|00001890| 20 74 68 65 20 63 6f 6e | 74 6f 75 72 73 2c 20 62 | the con|tours, b|
|000018a0| 72 65 61 6b 20 75 70 20 | 74 6f 20 66 69 74 20 6f |reak up |to fit o|
|000018b0| 6e 20 73 74 61 63 6b 20 | 69 66 20 6e 65 63 65 73 |n stack |if neces|
|000018c0| 73 61 72 79 20 2a 2a 2f | 0d 09 09 09 09 09 09 0d |sary **/|........|
|000018d0| 09 09 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 |..for (i| = 0; i |
|000018e0| 3c 20 6e 43 6f 6e 74 6f | 75 72 73 3b 20 69 2b 2b |< nConto|urs; i++|
|000018f0| 29 20 7b 09 09 2f 2f 20 | 4f 75 74 70 75 74 20 74 |) {..// |Output t|
|00001900| 68 65 20 63 6f 6e 74 6f | 75 72 73 2e 0d 09 09 0d |he conto|urs.....|
|00001910| 09 09 09 6e 50 6f 69 6e | 74 73 20 3d 20 2a 28 6c |...nPoin|ts = *(l|
|00001920| 6f 6e 67 2a 29 69 6e 50 | 61 74 68 3b 09 09 09 09 |ong*)inP|ath;....|
|00001930| 09 09 09 09 09 09 09 2f | 2f 20 47 65 74 20 74 68 |......./|/ Get th|
|00001940| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 70 6f 69 6e |e number| of poin|
|00001950| 74 73 20 66 6f 72 20 74 | 68 69 73 20 63 6f 6e 74 |ts for t|his cont|
|00001960| 6f 75 72 2e 0d 09 09 09 | 69 6e 50 61 74 68 20 2b |our.....|inPath +|
|00001970| 3d 20 73 69 7a 65 6f 66 | 28 6c 6f 6e 67 29 3b 09 |= sizeof|(long);.|
|00001980| 09 09 09 09 09 09 09 09 | 09 09 09 2f 2f 20 4d 6f |........|...// Mo|
|00001990| 76 65 20 74 6f 20 74 68 | 65 20 64 61 74 61 2e 0d |ve to th|e data..|
|000019a0| 09 09 09 09 09 09 0d 09 | 09 09 69 66 20 28 6e 50 |........|..if (nP|
|000019b0| 6f 69 6e 74 73 20 3e 20 | 30 29 20 7b 0d 09 09 09 |oints > |0) {....|
|000019c0| 0d 09 09 09 09 63 6f 6e | 74 72 6f 6c 42 69 74 4c |.....con|trolBitL|
|000019d0| 6f 6e 67 20 3d 20 28 75 | 6e 73 69 67 6e 65 64 20 |ong = (u|nsigned |
|000019e0| 6c 6f 6e 67 2a 29 69 6e | 50 61 74 68 3b 09 09 09 |long*)in|Path;...|
|000019f0| 2f 2f 20 47 65 74 20 74 | 6f 20 74 68 65 20 63 6f |// Get t|o the co|
|00001a00| 6e 74 72 6f 6c 20 62 69 | 74 73 2e 0d 09 09 09 09 |ntrol bi|ts......|
|00001a10| 0d 09 09 09 09 63 42 69 | 74 53 69 7a 65 20 3d 20 |.....cBi|tSize = |
|00001a20| 28 6e 50 6f 69 6e 74 73 | 20 2b 20 33 31 29 20 2f |(nPoints| + 31) /|
|00001a30| 20 33 32 3b 09 09 09 09 | 09 09 09 09 2f 2f 20 43 | 32;....|....// C|
|00001a40| 6f 6d 70 75 74 65 20 74 | 68 65 20 73 69 7a 65 20 |ompute t|he size |
|00001a50| 6f 66 20 63 6f 6e 74 72 | 6f 6c 20 62 69 74 73 20 |of contr|ol bits |
|00001a60| 69 6e 20 6c 6f 6e 67 73 | 2e 0d 09 09 09 09 09 09 |in longs|........|
|00001a70| 09 09 09 0d 09 09 09 09 | 69 6e 50 61 74 68 20 2b |........|inPath +|
|00001a80| 3d 20 63 42 69 74 53 69 | 7a 65 20 2a 20 73 69 7a |= cBitSi|ze * siz|
|00001a90| 65 6f 66 28 6c 6f 6e 67 | 29 3b 09 09 09 09 09 09 |eof(long|);......|
|00001aa0| 2f 2f 20 53 6b 69 70 20 | 70 61 73 74 20 63 6f 6e |// Skip |past con|
|00001ab0| 74 72 6f 6c 20 62 69 74 | 73 2c 20 69 6e 50 61 74 |trol bit|s, inPat|
|00001ac0| 68 20 6e 6f 77 20 70 6f | 69 6e 74 73 20 74 6f 20 |h now po|ints to |
|00001ad0| 66 69 72 73 74 20 70 6f | 69 6e 74 2e 0d 09 09 09 |first po|int.....|
|00001ae0| 09 0d 09 09 09 09 70 50 | 6f 69 6e 74 20 3d 20 28 |......pP|oint = (|
|00001af0| 67 78 50 6f 69 6e 74 2a | 29 69 6e 50 61 74 68 3b |gxPoint*|)inPath;|
|00001b00| 09 09 09 09 09 09 09 09 | 09 09 2f 2f 20 47 65 74 |........|..// Get|
|00001b10| 20 74 68 65 20 66 69 72 | 73 74 20 70 6f 69 6e 74 | the fir|st point|
|00001b20| 20 69 6e 20 63 6f 6e 74 | 6f 75 72 2c 20 6c 65 61 | in cont|our, lea|
|00001b30| 76 65 20 69 6e 50 61 74 | 68 20 70 6f 69 6e 74 69 |ve inPat|h pointi|
|00001b40| 6e 67 20 68 65 72 65 2e | 0d 09 09 09 09 0d 09 09 |ng here.|........|
|00001b50| 09 09 63 42 69 74 4d 61 | 73 6b 20 3d 20 30 78 38 |..cBitMa|sk = 0x8|
|00001b60| 30 30 30 30 30 30 30 55 | 3b 09 09 09 09 09 09 09 |0000000U|;.......|
|00001b70| 09 09 09 09 09 2f 2f 20 | 49 6e 69 74 69 6c 69 7a |.....// |Initiliz|
|00001b80| 65 20 74 68 65 20 6d 61 | 73 6b 20 66 6f 72 20 72 |e the ma|sk for r|
|00001b90| 65 61 64 69 6e 67 20 62 | 69 74 73 2e 0d 09 09 09 |eading b|its.....|
|00001ba0| 09 0d 09 09 09 09 6c 61 | 73 74 42 69 74 4d 61 73 |......la|stBitMas|
|00001bb0| 6b 20 3d 20 30 78 38 30 | 30 30 30 30 30 30 55 20 |k = 0x80|000000U |
|00001bc0| 3e 3e 20 28 28 6e 50 6f | 69 6e 74 73 2d 31 29 20 |>> ((nPo|ints-1) |
|00001bd0| 26 20 30 78 30 30 30 30 | 30 30 31 46 29 3b 09 09 |& 0x0000|001F);..|
|00001be0| 09 09 09 09 09 2f 2f 20 | 4d 6f 64 20 33 32 0d 09 |.....// |Mod 32..|
|00001bf0| 09 09 09 0d 09 09 09 09 | 0d 09 09 09 09 2f 2a 2a |........|...../**|
|00001c00| 20 43 6f 6d 70 75 74 65 | 20 74 68 65 20 66 69 72 | Compute| the fir|
|00001c10| 73 74 20 61 6e 64 20 6c | 61 73 74 20 70 6f 69 6e |st and l|ast poin|
|00001c20| 74 20 6f 6e 20 74 68 65 | 20 63 75 72 76 65 20 2a |t on the| curve *|
|00001c30| 2a 2f 0d 09 09 09 09 0d | 09 09 09 09 66 69 72 73 |*/......|....firs|
|00001c40| 74 49 73 4f 6e 20 3d 20 | 20 28 28 2a 63 6f 6e 74 |tIsOn = | ((*cont|
|00001c50| 72 6f 6c 42 69 74 4c 6f | 6e 67 20 26 20 63 42 69 |rolBitLo|ng & cBi|
|00001c60| 74 4d 61 73 6b 29 20 3d | 3d 20 30 29 3b 0d 09 09 |tMask) =|= 0);...|
|00001c70| 09 09 6c 61 73 74 49 73 | 4f 6e 20 3d 20 28 20 28 |..lastIs|On = ( (|
|00001c80| 20 2a 28 63 6f 6e 74 72 | 6f 6c 42 69 74 4c 6f 6e | *(contr|olBitLon|
|00001c90| 67 20 2b 20 63 42 69 74 | 53 69 7a 65 20 2d 20 31 |g + cBit|Size - 1|
|00001ca0| 29 20 26 20 6c 61 73 74 | 42 69 74 4d 61 73 6b 29 |) & last|BitMask)|
|00001cb0| 20 3d 3d 20 30 29 3b 0d | 09 09 09 09 0d 09 09 09 | == 0);.|........|
|00001cc0| 09 69 66 20 28 66 69 72 | 73 74 49 73 4f 6e 20 26 |.if (fir|stIsOn &|
|00001cd0| 26 20 6c 61 73 74 49 73 | 4f 6e 29 20 7b 09 2f 2f |& lastIs|On) {.//|
|00001ce0| 20 54 68 65 79 20 62 6f | 74 68 20 61 72 65 20 6f | They bo|th are o|
|00001cf0| 6e 2e 0d 09 09 09 09 0d | 09 09 09 09 09 66 69 72 |n.......|.....fir|
|00001d00| 73 74 50 6f 69 6e 74 20 | 3d 20 2a 70 50 6f 69 6e |stPoint |= *pPoin|
|00001d10| 74 3b 0d 09 09 09 09 09 | 66 69 72 73 74 49 6e 64 |t;......|firstInd|
|00001d20| 65 78 20 3d 20 30 3b 0d | 09 09 09 09 09 6c 61 73 |ex = 0;.|.....las|
|00001d30| 74 50 6f 69 6e 74 20 3d | 20 2a 28 70 50 6f 69 6e |tPoint =| *(pPoin|
|00001d40| 74 20 2b 20 6e 50 6f 69 | 6e 74 73 20 2d 20 31 29 |t + nPoi|nts - 1)|
|00001d50| 3b 0d 09 09 09 09 09 6c | 61 73 74 49 6e 64 65 78 |;......l|astIndex|
|00001d60| 20 3d 20 6e 50 6f 69 6e | 74 73 3b 0d 09 09 09 09 | = nPoin|ts;.....|
|00001d70| 09 4e 45 58 54 42 49 54 | 28 69 73 4f 66 66 2c 20 |.NEXTBIT|(isOff, |
|00001d80| 63 6f 6e 74 72 6f 6c 42 | 69 74 4c 6f 6e 67 2c 20 |controlB|itLong, |
|00001d90| 63 42 69 74 4d 61 73 6b | 29 3b 09 09 09 2f 2f 20 |cBitMask|);...// |
|00001da0| 52 65 61 64 20 62 69 74 | 20 66 6f 72 20 31 73 74 |Read bit| for 1st|
|00001db0| 20 70 6f 69 6e 74 2c 20 | 73 65 74 20 75 70 20 66 | point, |set up f|
|00001dc0| 6f 72 20 6e 65 78 74 2e | 0d 09 09 09 09 09 2b 2b |or next.|......++|
|00001dd0| 70 50 6f 69 6e 74 3b 0d | 09 09 09 09 09 0d 09 09 |pPoint;.|........|
|00001de0| 09 09 7d 20 65 6c 73 65 | 20 69 66 20 28 66 69 72 |..} else| if (fir|
|00001df0| 73 74 49 73 4f 6e 29 20 | 7b 09 09 09 09 2f 2f 20 |stIsOn) |{....// |
|00001e00| 66 69 72 73 74 20 77 61 | 73 20 6f 6e 2c 20 6c 61 |first wa|s on, la|
|00001e10| 73 74 20 77 61 73 20 6f | 66 66 0d 09 09 09 09 09 |st was o|ff......|
|00001e20| 0d 09 09 09 09 09 66 69 | 72 73 74 50 6f 69 6e 74 |......fi|rstPoint|
|00001e30| 20 3d 20 2a 70 50 6f 69 | 6e 74 3b 0d 09 09 09 09 | = *pPoi|nt;.....|
|00001e40| 09 66 69 72 73 74 49 6e | 64 65 78 20 3d 20 30 3b |.firstIn|dex = 0;|
|00001e50| 0d 09 09 09 09 09 0d 09 | 09 09 09 09 6c 61 73 74 |........|....last|
|00001e60| 50 6f 69 6e 74 20 3d 20 | 66 69 72 73 74 50 6f 69 |Point = |firstPoi|
|00001e70| 6e 74 3b 0d 09 09 09 09 | 09 0d 09 09 09 09 09 6c |nt;.....|.......l|
|00001e80| 61 73 74 49 6e 64 65 78 | 20 3d 20 6e 50 6f 69 6e |astIndex| = nPoin|
|00001e90| 74 73 20 2b 20 31 3b 0d | 09 09 09 09 09 4e 45 58 |ts + 1;.|.....NEX|
|00001ea0| 54 42 49 54 28 69 73 4f | 66 66 2c 20 63 6f 6e 74 |TBIT(isO|ff, cont|
|00001eb0| 72 6f 6c 42 69 74 4c 6f | 6e 67 2c 20 63 42 69 74 |rolBitLo|ng, cBit|
|00001ec0| 4d 61 73 6b 29 3b 09 09 | 09 2f 2f 20 52 65 61 64 |Mask);..|.// Read|
|00001ed0| 20 62 69 74 20 66 6f 72 | 20 31 73 74 20 70 6f 69 | bit for| 1st poi|
|00001ee0| 6e 74 2c 20 73 65 74 20 | 75 70 20 66 6f 72 20 6e |nt, set |up for n|
|00001ef0| 65 78 74 2e 0d 09 09 09 | 09 09 2b 2b 70 50 6f 69 |ext.....|..++pPoi|
|00001f00| 6e 74 3b 0d 09 09 09 09 | 0d 09 09 09 09 7d 20 65 |nt;.....|.....} e|
|00001f10| 6c 73 65 20 69 66 20 28 | 6c 61 73 74 49 73 4f 6e |lse if (|lastIsOn|
|00001f20| 29 20 7b 09 09 09 09 2f | 2f 20 6c 61 73 74 20 77 |) {..../|/ last w|
|00001f30| 61 73 20 6f 6e 2c 20 66 | 69 72 73 74 20 69 73 20 |as on, f|irst is |
|00001f40| 6f 66 66 0d 09 09 09 09 | 0d 09 09 09 09 09 72 65 |off.....|......re|
|00001f50| 67 69 73 74 65 72 20 67 | 78 50 6f 69 6e 74 2a 20 |gister g|xPoint* |
|00001f60| 70 4c 61 73 74 50 6f 69 | 6e 74 20 3d 20 70 50 6f |pLastPoi|nt = pPo|
|00001f70| 69 6e 74 20 2b 20 6e 50 | 6f 69 6e 74 73 20 2d 20 |int + nP|oints - |
|00001f80| 31 3b 0d 09 09 09 09 09 | 0d 09 09 09 09 09 6c 61 |1;......|......la|
|00001f90| 73 74 50 6f 69 6e 74 20 | 3d 20 2a 70 4c 61 73 74 |stPoint |= *pLast|
|00001fa0| 50 6f 69 6e 74 3b 0d 09 | 09 09 09 09 66 69 72 73 |Point;..|....firs|
|00001fb0| 74 50 6f 69 6e 74 20 3d | 20 6c 61 73 74 50 6f 69 |tPoint =| lastPoi|
|00001fc0| 6e 74 3b 0d 09 09 09 09 | 09 6c 61 73 74 49 6e 64 |nt;.....|.lastInd|
|00001fd0| 65 78 20 3d 20 6e 50 6f | 69 6e 74 73 3b 0d 09 09 |ex = nPo|ints;...|
|00001fe0| 09 09 09 0d 09 09 09 09 | 09 66 69 72 73 74 49 6e |........|.firstIn|
|00001ff0| 64 65 78 20 3d 20 2d 31 | 3b 0d 09 09 09 09 0d 09 |dex = -1|;.......|
|00002000| 09 09 09 7d 20 65 6c 73 | 65 20 7b 09 09 09 09 09 |...} els|e {.....|
|00002010| 09 09 09 09 09 09 2f 2f | 20 74 68 65 79 20 77 65 |......//| they we|
|00002020| 72 65 20 62 6f 74 68 20 | 6f 66 66 0d 09 09 09 09 |re both |off.....|
|00002030| 0d 09 09 09 09 09 72 65 | 67 69 73 74 65 72 20 67 |......re|gister g|
|00002040| 78 50 6f 69 6e 74 2a 20 | 70 4c 61 73 74 50 6f 69 |xPoint* |pLastPoi|
|00002050| 6e 74 20 3d 20 70 50 6f | 69 6e 74 20 2b 20 6e 50 |nt = pPo|int + nP|
|00002060| 6f 69 6e 74 73 20 2d 20 | 31 3b 0d 09 09 09 09 09 |oints - |1;......|
|00002070| 0d 09 09 09 09 09 66 69 | 72 73 74 49 6e 64 65 78 |......fi|rstIndex|
|00002080| 20 3d 20 2d 31 3b 0d 09 | 09 09 09 09 6c 61 73 74 | = -1;..|....last|
|00002090| 49 6e 64 65 78 20 3d 20 | 6e 50 6f 69 6e 74 73 20 |Index = |nPoints |
|000020a0| 2b 20 31 3b 0d 09 09 09 | 09 09 0d 09 09 09 09 09 |+ 1;....|........|
|000020b0| 49 4e 54 45 52 50 50 4f | 49 4e 54 28 6c 61 73 74 |INTERPPO|INT(last|
|000020c0| 50 6f 69 6e 74 2c 20 2a | 70 50 6f 69 6e 74 2c 20 |Point, *|pPoint, |
|000020d0| 2a 70 4c 61 73 74 50 6f | 69 6e 74 29 3b 0d 09 09 |*pLastPo|int);...|
|000020e0| 09 09 09 0d 09 09 09 09 | 09 66 69 72 73 74 50 6f |........|.firstPo|
|000020f0| 69 6e 74 20 3d 20 6c 61 | 73 74 50 6f 69 6e 74 3b |int = la|stPoint;|
|00002100| 0d 09 09 09 09 09 09 09 | 09 0d 09 09 09 09 7d 20 |........|......} |
|00002110| 2f 2f 65 6e 64 20 69 66 | 0d 09 09 09 09 0d 09 09 |//end if|........|
|00002120| 09 09 0d 09 09 09 09 2f | 2a 2a 2a 20 4f 75 74 70 |......./|*** Outp|
|00002130| 75 74 20 74 68 65 20 63 | 6f 6e 74 6f 75 72 20 2a |ut the c|ontour *|
|00002140| 2a 2a 2a 2f 0d 09 09 09 | 09 0d 09 09 09 09 71 5b |***/....|......q[|
|00002150| 30 5d 20 3d 20 66 69 72 | 73 74 50 6f 69 6e 74 3b |0] = fir|stPoint;|
|00002160| 0d 09 09 09 09 71 49 6e | 64 65 78 20 3d 20 30 3b |.....qIn|dex = 0;|
|00002170| 0d 09 09 09 09 73 74 61 | 74 75 73 20 3d 20 28 2a |.....sta|tus = (*|
|00002180| 44 6f 4d 6f 76 65 74 6f | 29 28 26 28 71 5b 30 5d |DoMoveto|)(&(q[0]|
|00002190| 29 2c 20 72 65 66 63 6f | 6e 29 3b 0d 09 09 09 09 |), refco|n);.....|
|000021a0| 6e 72 65 71 75 69 72 65 | 28 73 74 61 74 75 73 2c |nrequire|(status,|
|000021b0| 20 66 61 69 6c 65 64 5f | 4f 75 74 70 75 74 29 3b | failed_|Output);|
|000021c0| 0d 09 09 09 09 09 0d 09 | 09 09 09 2f 2f 20 4c 6f |........|...// Lo|
|000021d0| 6f 70 20 6f 76 65 72 20 | 61 6c 6c 20 70 6f 69 6e |op over |all poin|
|000021e0| 74 73 20 62 75 74 20 74 | 68 65 20 66 69 72 73 74 |ts but t|he first|
|000021f0| 20 61 6e 64 20 6c 61 73 | 74 20 4f 4e 20 74 68 65 | and las|t ON the|
|00002200| 20 63 75 72 76 65 2e 0d | 09 09 09 09 0d 09 09 09 | curve..|........|
|00002210| 09 4e 45 58 54 42 49 54 | 28 69 73 4f 66 66 2c 20 |.NEXTBIT|(isOff, |
|00002220| 63 6f 6e 74 72 6f 6c 42 | 69 74 4c 6f 6e 67 2c 20 |controlB|itLong, |
|00002230| 63 42 69 74 4d 61 73 6b | 29 3b 09 09 2f 2f 20 43 |cBitMask|);..// C|
|00002240| 68 65 63 6b 20 74 68 65 | 20 66 69 72 73 74 20 70 |heck the| first p|
|00002250| 6f 69 6e 74 20 69 6e 20 | 74 68 65 20 6c 6f 6f 70 |oint in |the loop|
|00002260| 69 6e 67 2e 0d 09 09 09 | 09 70 6f 69 6e 74 49 6e |ing.....|.pointIn|
|00002270| 64 65 78 20 3d 20 66 69 | 72 73 74 49 6e 64 65 78 |dex = fi|rstIndex|
|00002280| 20 2b 20 31 3b 0d 09 09 | 09 09 77 68 69 6c 65 20 | + 1;...|..while |
|00002290| 28 70 6f 69 6e 74 49 6e | 64 65 78 20 3c 20 28 6c |(pointIn|dex < (l|
|000022a0| 61 73 74 49 6e 64 65 78 | 20 2d 20 31 29 29 20 7b |astIndex| - 1)) {|
|000022b0| 09 09 09 2f 2f 20 49 20 | 6b 6e 6f 77 2c 20 73 68 |...// I |know, sh|
|000022c0| 6f 75 6c 64 20 63 61 63 | 68 65 20 6c 61 73 74 50 |ould cac|he lastP|
|000022d0| 6f 69 6e 74 49 6e 64 65 | 78 2d 31 0d 09 09 09 09 |ointInde|x-1.....|
|000022e0| 09 09 09 09 09 0d 09 09 | 09 09 09 69 66 20 28 21 |........|...if (!|
|000022f0| 69 73 4f 66 66 29 20 7b | 09 09 09 09 09 09 09 09 |isOff) {|........|
|00002300| 09 2f 2f 20 49 66 20 74 | 68 65 20 6e 65 78 74 20 |.// If t|he next |
|00002310| 70 6f 69 6e 74 20 69 73 | 20 6f 6e 20 74 68 65 20 |point is| on the |
|00002320| 63 75 72 76 65 3a 0d 09 | 09 09 09 09 0d 09 09 09 |curve:..|........|
|00002330| 09 09 09 69 66 20 28 20 | 71 49 6e 64 65 78 20 3d |...if ( |qIndex =|
|00002340| 3d 20 30 29 20 7b 09 09 | 09 09 09 2f 2f 20 49 66 |= 0) {..|...// If|
|00002350| 20 77 65 20 68 61 76 65 | 20 6f 6e 6c 79 20 71 30 | we have| only q0|
|00002360| 2c 20 74 68 65 6e 20 64 | 6f 20 61 20 6c 69 6e 65 |, then d|o a line|
|00002370| 20 61 6e 64 20 73 74 61 | 72 74 20 6f 76 65 72 2e | and sta|rt over.|
|00002380| 0d 09 09 09 09 09 0d 09 | 09 09 09 09 09 09 73 74 |........|......st|
|00002390| 61 74 75 73 20 3d 20 28 | 2a 44 6f 4c 69 6e 65 74 |atus = (|*DoLinet|
|000023a0| 6f 29 28 70 50 6f 69 6e | 74 2c 20 72 65 66 63 6f |o)(pPoin|t, refco|
|000023b0| 6e 29 3b 0d 09 09 09 09 | 09 09 09 6e 72 65 71 75 |n);.....|...nrequ|
|000023c0| 69 72 65 28 73 74 61 74 | 75 73 2c 20 66 61 69 6c |ire(stat|us, fail|
|000023d0| 65 64 5f 4f 75 74 70 75 | 74 29 3b 0d 09 09 09 09 |ed_Outpu|t);.....|
|000023e0| 09 09 09 71 5b 30 5d 20 | 3d 20 2a 70 50 6f 69 6e |...q[0] |= *pPoin|
|000023f0| 74 2b 2b 3b 0d 09 09 09 | 09 09 09 09 2b 2b 70 6f |t++;....|....++po|
|00002400| 69 6e 74 49 6e 64 65 78 | 3b 0d 09 0d 09 09 09 09 |intIndex|;.......|
|00002410| 09 09 09 4e 45 58 54 42 | 49 54 28 69 73 4f 66 66 |...NEXTB|IT(isOff|
|00002420| 2c 20 63 6f 6e 74 72 6f | 6c 42 69 74 4c 6f 6e 67 |, contro|lBitLong|
|00002430| 2c 20 63 42 69 74 4d 61 | 73 6b 29 3b 0d 09 09 09 |, cBitMa|sk);....|
|00002440| 09 09 09 09 09 09 09 09 | 09 09 09 0d 09 09 09 09 |........|........|
|00002450| 09 09 7d 20 65 6c 73 65 | 20 7b 09 09 09 09 09 09 |..} else| {......|
|00002460| 09 09 09 09 2f 2f 20 57 | 65 20 6d 75 73 74 20 68 |....// W|e must h|
|00002470| 61 76 65 20 71 30 20 61 | 6e 64 20 71 31 2c 20 64 |ave q0 a|nd q1, d|
|00002480| 6f 20 61 20 63 75 72 76 | 65 3a 20 71 30 2c 20 71 |o a curv|e: q0, q|
|00002490| 31 2c 20 71 32 0d 09 09 | 09 09 09 09 0d 09 09 09 |1, q2...|........|
|000024a0| 09 09 09 09 71 5b 32 5d | 20 3d 20 2a 70 50 6f 69 |....q[2]| = *pPoi|
|000024b0| 6e 74 2b 2b 3b 0d 09 09 | 09 09 09 09 09 73 74 61 |nt++;...|.....sta|
|000024c0| 74 75 73 20 3d 20 28 2a | 44 6f 43 75 72 76 65 74 |tus = (*|DoCurvet|
|000024d0| 6f 29 28 71 2c 20 72 65 | 66 63 6f 6e 29 3b 0d 09 |o)(q, re|fcon);..|
|000024e0| 09 09 09 09 09 09 6e 72 | 65 71 75 69 72 65 28 73 |......nr|equire(s|
|000024f0| 74 61 74 75 73 2c 20 66 | 61 69 6c 65 64 5f 4f 75 |tatus, f|ailed_Ou|
|00002500| 74 70 75 74 29 3b 0d 09 | 09 09 09 09 09 09 71 5b |tput);..|......q[|
|00002510| 30 5d 20 3d 20 71 5b 32 | 5d 3b 0d 09 09 09 09 09 |0] = q[2|];......|
|00002520| 09 09 71 49 6e 64 65 78 | 20 3d 20 30 3b 0d 09 09 |..qIndex| = 0;...|
|00002530| 09 09 09 09 09 2b 2b 70 | 6f 69 6e 74 49 6e 64 65 |.....++p|ointInde|
|00002540| 78 3b 0d 09 09 09 09 09 | 09 09 4e 45 58 54 42 49 |x;......|..NEXTBI|
|00002550| 54 28 69 73 4f 66 66 2c | 20 63 6f 6e 74 72 6f 6c |T(isOff,| control|
|00002560| 42 69 74 4c 6f 6e 67 2c | 20 63 42 69 74 4d 61 73 |BitLong,| cBitMas|
|00002570| 6b 29 3b 0d 09 09 09 09 | 09 09 09 09 09 09 09 09 |k);.....|........|
|00002580| 09 0d 09 09 09 09 09 09 | 7d 2f 2f 65 6e 64 20 69 |........|}//end i|
|00002590| 66 0d 09 09 09 09 09 0d | 09 09 09 09 09 7d 20 65 |f.......|.....} e|
|000025a0| 6c 73 65 20 7b 0d 09 09 | 09 09 09 0d 09 09 09 09 |lse {...|........|
|000025b0| 09 09 69 66 20 28 71 49 | 6e 64 65 78 20 3d 3d 20 |..if (qI|ndex == |
|000025c0| 30 29 20 7b 09 09 09 09 | 09 2f 2f 20 49 66 20 77 |0) {....|.// If w|
|000025d0| 65 20 6f 6e 6c 79 20 68 | 61 76 65 20 6f 6e 65 20 |e only h|ave one |
|000025e0| 70 6f 69 6e 74 20 73 6f | 20 66 61 72 2c 20 74 68 |point so| far, th|
|000025f0| 69 73 20 62 65 63 6f 6d | 65 73 20 32 6e 64 2e 0d |is becom|es 2nd..|
|00002600| 09 09 09 09 09 09 0d 09 | 09 09 09 09 09 09 71 5b |........|......q[|
|00002610| 31 5d 20 3d 20 2a 70 50 | 6f 69 6e 74 2b 2b 3b 0d |1] = *pP|oint++;.|
|00002620| 09 09 09 09 09 09 09 71 | 49 6e 64 65 78 20 3d 20 |.......q|Index = |
|00002630| 31 3b 0d 09 09 09 09 09 | 09 09 4e 45 58 54 42 49 |1;......|..NEXTBI|
|00002640| 54 28 69 73 4f 66 66 2c | 20 63 6f 6e 74 72 6f 6c |T(isOff,| control|
|00002650| 42 69 74 4c 6f 6e 67 2c | 20 63 42 69 74 4d 61 73 |BitLong,| cBitMas|
|00002660| 6b 29 3b 0d 09 09 09 09 | 09 09 09 2b 2b 70 6f 69 |k);.....|...++poi|
|00002670| 6e 74 49 6e 64 65 78 3b | 0d 09 09 09 09 09 09 0d |ntIndex;|........|
|00002680| 09 09 09 09 09 09 7d 20 | 65 6c 73 65 20 7b 09 09 |......} |else {..|
|00002690| 09 09 09 09 09 09 09 09 | 2f 2f 20 57 65 20 68 61 |........|// We ha|
|000026a0| 64 20 32 20 70 6f 69 6e | 74 73 2c 20 69 6e 74 65 |d 2 poin|ts, inte|
|000026b0| 72 70 6f 6c 61 74 65 20 | 74 6f 20 67 65 74 20 33 |rpolate |to get 3|
|000026c0| 72 64 20 61 6e 64 20 64 | 6f 20 61 20 63 75 72 76 |rd and d|o a curv|
|000026d0| 65 0d 09 09 09 09 09 09 | 0d 09 09 09 09 09 09 09 |e.......|........|
|000026e0| 49 4e 54 45 52 50 50 4f | 49 4e 54 28 71 5b 32 5d |INTERPPO|INT(q[2]|
|000026f0| 2c 20 71 5b 31 5d 2c 20 | 2a 70 50 6f 69 6e 74 29 |, q[1], |*pPoint)|
|00002700| 3b 0d 09 09 09 09 09 09 | 09 0d 09 09 09 09 09 09 |;.......|........|
|00002710| 09 73 74 61 74 75 73 20 | 3d 20 28 2a 44 6f 43 75 |.status |= (*DoCu|
|00002720| 72 76 65 74 6f 29 28 20 | 71 2c 20 72 65 66 63 6f |rveto)( |q, refco|
|00002730| 6e 29 3b 0d 09 09 09 09 | 09 09 09 6e 72 65 71 75 |n);.....|...nrequ|
|00002740| 69 72 65 28 73 74 61 74 | 75 73 2c 20 66 61 69 6c |ire(stat|us, fail|
|00002750| 65 64 5f 4f 75 74 70 75 | 74 29 3b 0d 09 09 09 09 |ed_Outpu|t);.....|
|00002760| 09 09 09 71 49 6e 64 65 | 78 20 3d 20 30 3b 0d 09 |...qInde|x = 0;..|
|00002770| 09 09 09 09 09 09 71 5b | 30 5d 20 3d 20 71 5b 32 |......q[|0] = q[2|
|00002780| 5d 3b 09 09 09 09 09 0d | 0d 09 09 09 09 09 09 7d |];......|.......}|
|00002790| 2f 2f 65 6e 64 20 69 66 | 0d 09 09 09 09 09 0d 09 |//end if|........|
|000027a0| 09 09 09 09 7d 2f 2f 65 | 6e 64 20 69 66 0d 09 09 |....}//e|nd if...|
|000027b0| 09 09 0d 0d 09 09 09 09 | 7d 2f 2f 65 6e 64 20 77 |........|}//end w|
|000027c0| 68 69 6c 65 0d 09 09 09 | 09 09 09 09 09 0d 09 09 |hile....|........|
|000027d0| 09 09 2f 2a 2a 20 4e 6f | 77 20 68 61 6e 64 6c 65 |../** No|w handle|
|000027e0| 20 74 68 65 20 6c 61 73 | 74 20 70 6f 69 6e 74 20 | the las|t point |
|000027f0| 74 68 61 74 20 69 73 20 | 4f 4e 20 74 68 65 20 63 |that is |ON the c|
|00002800| 75 72 76 65 20 69 6e 20 | 74 68 65 20 63 6f 6e 74 |urve in |the cont|
|00002810| 6f 75 72 20 2a 2a 2f 0d | 09 09 09 09 0d 09 09 09 |our **/.|........|
|00002820| 09 69 66 20 28 71 49 6e | 64 65 78 20 3d 3d 20 30 |.if (qIn|dex == 0|
|00002830| 29 20 7b 09 09 09 09 2f | 2f 20 49 66 20 77 65 20 |) {..../|/ If we |
|00002840| 6f 6e 6c 79 20 68 61 64 | 20 6f 6e 65 20 70 6f 69 |only had| one poi|
|00002850| 6e 74 20 73 6f 20 66 61 | 72 2c 20 44 6f 20 61 20 |nt so fa|r, Do a |
|00002860| 6c 69 6e 65 2e 0d 09 09 | 09 09 09 09 09 09 09 0d |line....|........|
|00002870| 09 09 09 09 09 73 74 61 | 74 75 73 20 3d 20 28 2a |.....sta|tus = (*|
|00002880| 44 6f 4c 69 6e 65 74 6f | 29 28 20 26 6c 61 73 74 |DoLineto|)( &last|
|00002890| 50 6f 69 6e 74 2c 20 72 | 65 66 63 6f 6e 29 3b 0d |Point, r|efcon);.|
|000028a0| 09 09 09 09 09 6e 72 65 | 71 75 69 72 65 28 73 74 |.....nre|quire(st|
|000028b0| 61 74 75 73 2c 20 66 61 | 69 6c 65 64 5f 4f 75 74 |atus, fa|iled_Out|
|000028c0| 70 75 74 29 3b 09 09 0d | 09 09 09 09 09 09 09 09 |put);...|........|
|000028d0| 09 0d 09 09 09 09 7d 20 | 65 6c 73 65 20 7b 09 09 |......} |else {..|
|000028e0| 09 09 09 09 09 09 09 2f | 2f 20 45 6c 73 65 2c 20 |......./|/ Else, |
|000028f0| 77 65 20 6d 75 73 74 20 | 68 61 76 65 20 68 61 64 |we must |have had|
|00002900| 20 32 20 70 6f 69 6e 74 | 73 20 73 6f 20 66 61 72 | 2 point|s so far|
|00002910| 2c 20 44 6f 20 61 20 63 | 75 72 76 65 2e 0d 09 09 |, Do a c|urve....|
|00002920| 09 09 0d 09 09 09 09 09 | 71 5b 32 5d 20 3d 20 6c |........|q[2] = l|
|00002930| 61 73 74 50 6f 69 6e 74 | 3b 0d 09 09 09 09 09 73 |astPoint|;......s|
|00002940| 74 61 74 75 73 20 3d 20 | 28 2a 44 6f 43 75 72 76 |tatus = |(*DoCurv|
|00002950| 65 74 6f 29 28 71 2c 20 | 72 65 66 63 6f 6e 29 3b |eto)(q, |refcon);|
|00002960| 0d 09 09 09 09 09 6e 72 | 65 71 75 69 72 65 28 73 |......nr|equire(s|
|00002970| 74 61 74 75 73 2c 20 66 | 61 69 6c 65 64 5f 4f 75 |tatus, f|ailed_Ou|
|00002980| 74 70 75 74 29 3b 0d 09 | 09 09 09 09 09 09 09 09 |tput);..|........|
|00002990| 0d 09 09 09 09 7d 2f 2f | 65 6e 64 20 69 66 0d 09 |.....}//|end if..|
|000029a0| 09 09 09 0d 09 09 09 09 | 69 66 20 28 63 6c 6f 73 |........|if (clos|
|000029b0| 65 49 74 29 20 7b 0d 09 | 09 09 09 0d 09 09 09 09 |eIt) {..|........|
|000029c0| 09 73 74 61 74 75 73 20 | 3d 20 28 2a 44 6f 43 6c |.status |= (*DoCl|
|000029d0| 6f 73 65 70 61 74 68 29 | 28 72 65 66 63 6f 6e 29 |osepath)|(refcon)|
|000029e0| 3b 0d 09 09 09 09 09 6e | 72 65 71 75 69 72 65 28 |;......n|require(|
|000029f0| 73 74 61 74 75 73 2c 20 | 66 61 69 6c 65 64 5f 4f |status, |failed_O|
|00002a00| 75 74 70 75 74 29 3b 0d | 09 09 09 09 09 0d 09 09 |utput);.|........|
|00002a10| 09 09 7d 2f 2f 65 6e 64 | 20 69 66 0d 09 09 09 09 |..}//end| if.....|
|00002a20| 0d 09 09 09 09 2f 2a 2a | 20 50 6f 69 6e 74 20 69 |...../**| Point i|
|00002a30| 6e 74 6f 20 74 68 65 20 | 6e 65 78 74 20 63 6f 6e |nto the |next con|
|00002a40| 74 6f 75 72 20 2d 20 69 | 6e 50 61 74 68 20 77 61 |tour - i|nPath wa|
|00002a50| 73 20 70 6f 69 6e 74 69 | 6e 67 20 74 6f 20 66 69 |s pointi|ng to fi|
|00002a60| 72 73 74 20 70 6f 69 6e | 74 20 69 6e 20 63 6f 6e |rst poin|t in con|
|00002a70| 74 6f 75 72 20 2a 2a 2f | 0d 09 09 09 09 0d 09 09 |tour **/|........|
|00002a80| 09 09 69 6e 50 61 74 68 | 20 2b 3d 20 6e 50 6f 69 |..inPath| += nPoi|
|00002a90| 6e 74 73 20 2a 20 73 69 | 7a 65 6f 66 28 67 78 50 |nts * si|zeof(gxP|
|00002aa0| 6f 69 6e 74 29 3b 0d 09 | 09 09 09 09 09 09 09 09 |oint);..|........|
|00002ab0| 0d 09 09 09 7d 2f 2f 65 | 6e 64 20 69 66 0d 09 09 |....}//e|nd if...|
|00002ac0| 0d 09 09 7d 2f 2f 65 6e | 64 6f 20 66 6f 72 20 69 |...}//en|do for i|
|00002ad0| 0d 09 09 0d 66 61 69 6c | 65 64 5f 4f 75 74 70 75 |....fail|ed_Outpu|
|00002ae0| 74 3a 0d 0d 09 09 2f 2a | 2a 20 52 65 73 74 6f 72 |t:..../*|* Restor|
|00002af0| 65 20 74 68 69 6e 67 73 | 2c 20 74 68 6f 75 67 68 |e things|, though|
|00002b00| 20 74 68 65 20 73 68 61 | 70 65 20 69 73 20 61 20 | the sha|pe is a |
|00002b10| 63 6f 70 79 20 61 6e 64 | 20 77 65 20 72 65 61 6c |copy and| we real|
|00002b20| 6c 79 20 64 6f 6e 27 74 | 20 68 61 76 65 20 74 6f |ly don't| have to|
|00002b30| 2e 20 2a 2a 2f 0d 0d 09 | 09 47 58 53 65 74 53 68 |. **/...|.GXSetSh|
|00002b40| 61 70 65 41 74 74 72 69 | 62 75 74 65 73 28 74 68 |apeAttri|butes(th|
|00002b50| 65 53 68 61 70 65 2c 20 | 74 68 65 41 74 74 72 69 |eShape, |theAttri|
|00002b60| 62 75 74 65 73 29 3b 0d | 09 09 47 58 55 6e 6c 6f |butes);.|..GXUnlo|
|00002b70| 63 6b 53 68 61 70 65 28 | 74 68 65 53 68 61 70 65 |ckShape(|theShape|
|00002b80| 29 3b 0d 09 09 0d 66 61 | 69 6c 65 64 5f 4b 65 65 |);....fa|iled_Kee|
|00002b90| 70 44 69 72 65 63 74 3a | 09 09 0d 09 09 0d 0d 09 |pDirect:|........|
|00002ba0| 09 72 65 74 75 72 6e 28 | 73 74 61 74 75 73 29 3b |.return(|status);|
|00002bb0| 0d 09 0d 09 7d 2f 2f 50 | 61 74 68 57 61 6c 6b 65 |....}//P|athWalke|
|00002bc0| 72 0d 09 0d 0d 0d 0d 2f | 2a 2a 2a 2a 2a 2a 2a 2a |r....../|********|
|00002bd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002be0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0d 09 50 6f 6c |********|***..Pol|
|00002bf0| 79 67 6f 6e 57 61 6c 6b | 65 72 3a 0d 09 0d 09 57 |ygonWalk|er:....W|
|00002c00| 61 6c 6b 20 61 20 70 6f | 6c 79 67 6f 6e 20 61 6e |alk a po|lygon an|
|00002c10| 64 20 63 61 6c 6c 20 62 | 61 63 6b 0d 09 0d 2a 2a |d call b|ack...**|
|00002c20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c40| 2a 2a 2a 2f 0d 4f 53 45 | 72 72 20 50 6f 6c 79 67 |***/.OSE|rr Polyg|
|00002c50| 6f 6e 57 61 6c 6b 65 72 | 28 67 78 53 68 61 70 65 |onWalker|(gxShape|
|00002c60| 20 74 68 65 53 68 61 70 | 65 2c 20 54 70 77 4d 6f | theShap|e, TpwMo|
|00002c70| 76 65 74 6f 50 72 6f 63 | 20 44 6f 4d 6f 76 65 74 |vetoProc| DoMovet|
|00002c80| 6f 2c 20 54 70 77 4c 69 | 6e 65 74 6f 50 72 6f 63 |o, TpwLi|netoProc|
|00002c90| 20 44 6f 4c 69 6e 65 74 | 6f 2c 20 54 70 77 43 6c | DoLinet|o, TpwCl|
|00002ca0| 6f 73 65 70 61 74 68 50 | 72 6f 63 20 44 6f 43 6c |osepathP|roc DoCl|
|00002cb0| 6f 73 65 70 61 74 68 2c | 20 76 6f 69 64 2a 20 72 |osepath,| void* r|
|00002cc0| 65 66 63 6f 6e 29 3b 0d | 4f 53 45 72 72 20 50 6f |efcon);.|OSErr Po|
|00002cd0| 6c 79 67 6f 6e 57 61 6c | 6b 65 72 28 67 78 53 68 |lygonWal|ker(gxSh|
|00002ce0| 61 70 65 20 74 68 65 53 | 68 61 70 65 2c 20 54 70 |ape theS|hape, Tp|
|00002cf0| 77 4d 6f 76 65 74 6f 50 | 72 6f 63 20 44 6f 4d 6f |wMovetoP|roc DoMo|
|00002d00| 76 65 74 6f 2c 20 54 70 | 77 4c 69 6e 65 74 6f 50 |veto, Tp|wLinetoP|
|00002d10| 72 6f 63 20 44 6f 4c 69 | 6e 65 74 6f 2c 20 54 70 |roc DoLi|neto, Tp|
|00002d20| 77 43 6c 6f 73 65 70 61 | 74 68 50 72 6f 63 20 44 |wClosepa|thProc D|
|00002d30| 6f 43 6c 6f 73 65 70 61 | 74 68 2c 20 76 6f 69 64 |oClosepa|th, void|
|00002d40| 2a 20 72 65 66 63 6f 6e | 29 0d 09 7b 0d 09 09 42 |* refcon|)..{...B|
|00002d50| 6f 6f 6c 65 61 6e 09 09 | 09 09 09 09 09 73 74 61 |oolean..|.....sta|
|00002d60| 74 75 73 20 3d 20 66 61 | 6c 73 65 3b 0d 09 09 50 |tus = fa|lse;...P|
|00002d70| 74 72 09 09 09 09 09 09 | 09 09 09 69 6e 50 6f 6c |tr......|...inPol|
|00002d80| 79 67 6f 6e 3b 09 09 09 | 09 09 09 09 2f 2f 20 57 |ygon;...|....// W|
|00002d90| 65 20 6d 75 73 74 20 77 | 61 6c 6b 20 74 68 72 6f |e must w|alk thro|
|00002da0| 75 67 68 20 74 68 65 20 | 70 6f 6c 79 67 6f 6e 73 |ugh the |polygons|
|00002db0| 20 73 74 72 75 63 74 75 | 72 65 0d 09 09 67 78 53 | structu|re...gxS|
|00002dc0| 68 61 70 65 41 74 74 72 | 69 62 75 74 65 09 09 74 |hapeAttr|ibute..t|
|00002dd0| 68 65 41 74 74 72 69 62 | 75 74 65 73 3b 0d 09 09 |heAttrib|utes;...|
|00002de0| 6c 6f 6e 67 09 09 09 09 | 09 09 09 09 69 2c 20 6a |long....|....i, j|
|00002df0| 3b 0d 09 09 42 6f 6f 6c | 65 61 6e 09 09 09 09 09 |;...Bool|ean.....|
|00002e00| 09 09 63 6c 6f 73 65 49 | 74 3b 09 09 09 09 09 09 |..closeI|t;......|
|00002e10| 09 09 2f 2f 20 49 73 20 | 69 74 20 6f 70 65 6e 20 |..// Is |it open |
|00002e20| 6f 72 20 63 6c 6f 73 65 | 64 2e 0d 09 09 6c 6f 6e |or close|d....lon|
|00002e30| 67 09 09 09 09 09 09 09 | 09 6e 43 6f 6e 74 6f 75 |g.......|.nContou|
|00002e40| 72 73 3b 09 09 09 09 09 | 09 09 2f 2f 20 4e 75 6d |rs;.....|..// Num|
|00002e50| 62 65 72 20 6f 66 20 63 | 6f 6e 74 6f 75 72 73 2e |ber of c|ontours.|
|00002e60| 0d 09 09 6c 6f 6e 67 09 | 09 09 09 09 09 09 09 6e |...long.|.......n|
|00002e70| 50 6f 69 6e 74 73 3b 09 | 09 09 09 09 09 09 09 2f |Points;.|......./|
|00002e80| 2f 20 4e 75 6d 62 65 72 | 20 6f 66 20 70 6f 69 6e |/ Number| of poin|
|00002e90| 74 73 20 69 6e 20 63 6f | 6e 74 6f 75 72 2e 0d 09 |ts in co|ntour...|
|00002ea0| 09 67 78 50 6f 69 6e 74 | 2a 09 09 09 09 09 09 70 |.gxPoint|*......p|
|00002eb0| 50 6f 69 6e 74 3b 09 09 | 09 09 09 09 09 09 09 2f |Point;..|......./|
|00002ec0| 2f 20 50 6f 69 6e 74 20 | 74 6f 20 61 20 70 6f 69 |/ Point |to a poi|
|00002ed0| 6e 74 2e 0d 09 09 6c 6f | 6e 67 09 09 09 09 09 09 |nt....lo|ng......|
|00002ee0| 09 09 73 69 7a 65 3b 0d | 09 09 09 09 0d 09 09 0d |..size;.|........|
|00002ef0| 09 09 2f 2a 20 49 66 20 | 69 74 20 69 73 20 63 6c |../* If |it is cl|
|00002f00| 6f 73 65 64 46 72 61 6d | 65 46 69 6c 6c 20 77 65 |osedFram|eFill we|
|00002f10| 20 6d 75 73 74 20 63 6c | 6f 73 65 20 65 61 63 68 | must cl|ose each|
|00002f20| 20 63 6f 6e 74 6f 75 72 | 20 2a 2f 0d 0d 09 09 63 | contour| */....c|
|00002f30| 6c 6f 73 65 49 74 20 3d | 20 28 47 58 47 65 74 53 |loseIt =| (GXGetS|
|00002f40| 68 61 70 65 46 69 6c 6c | 28 74 68 65 53 68 61 70 |hapeFill|(theShap|
|00002f50| 65 29 20 3d 3d 20 67 78 | 43 6c 6f 73 65 64 46 72 |e) == gx|ClosedFr|
|00002f60| 61 6d 65 46 69 6c 6c 29 | 3b 0d 09 09 0d 09 09 2f |ameFill)|;....../|
|00002f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0d 09 09 09 4d |********|***....M|
|00002f80| 61 6b 65 20 73 75 72 65 | 20 77 65 20 68 61 76 65 |ake sure| we have|
|00002f90| 20 61 63 63 65 73 73 20 | 74 6f 20 74 68 65 20 73 | access |to the s|
|00002fa0| 68 61 70 65 20 64 61 74 | 61 20 73 74 72 75 63 74 |hape dat|a struct|
|00002fb0| 75 72 65 2c 0d 09 09 09 | 61 6e 64 20 74 68 65 6e |ure,....|and then|
|00002fc0| 20 67 65 74 20 69 74 0d | 09 09 2a 2a 2a 2a 2a 2a | get it.|..******|
|00002fd0| 2a 2a 2a 2a 2a 2f 09 09 | 0d 09 09 74 68 65 41 74 |*****/..|...theAt|
|00002fe0| 74 72 69 62 75 74 65 73 | 20 3d 20 47 58 47 65 74 |tributes| = GXGet|
|00002ff0| 53 68 61 70 65 41 74 74 | 72 69 62 75 74 65 73 28 |ShapeAtt|ributes(|
|00003000| 74 68 65 53 68 61 70 65 | 29 3b 0d 09 09 47 58 53 |theShape|);...GXS|
|00003010| 65 74 53 68 61 70 65 41 | 74 74 72 69 62 75 74 65 |etShapeA|ttribute|
|00003020| 73 28 74 68 65 53 68 61 | 70 65 2c 20 74 68 65 41 |s(theSha|pe, theA|
|00003030| 74 74 72 69 62 75 74 65 | 73 20 7c 20 67 78 44 69 |ttribute|s | gxDi|
|00003040| 72 65 63 74 53 68 61 70 | 65 29 3b 0d 09 09 47 58 |rectShap|e);...GX|
|00003050| 4c 6f 63 6b 53 68 61 70 | 65 28 74 68 65 53 68 61 |LockShap|e(theSha|
|00003060| 70 65 29 3b 0d 09 09 0d | 09 09 73 74 61 74 75 73 |pe);....|..status|
|00003070| 20 3d 20 47 58 47 65 74 | 47 72 61 70 68 69 63 73 | = GXGet|Graphics|
|00003080| 45 72 72 6f 72 28 6e 69 | 6c 29 3b 0d 09 09 6e 72 |Error(ni|l);...nr|
|00003090| 65 71 75 69 72 65 28 73 | 74 61 74 75 73 2c 20 66 |equire(s|tatus, f|
|000030a0| 61 69 6c 65 64 5f 4b 65 | 65 70 44 69 72 65 63 74 |ailed_Ke|epDirect|
|000030b0| 29 3b 0d 09 09 0d 09 09 | 0d 09 09 69 6e 50 6f 6c |);......|...inPol|
|000030c0| 79 67 6f 6e 20 3d 20 28 | 50 74 72 29 47 58 47 65 |ygon = (|Ptr)GXGe|
|000030d0| 74 53 68 61 70 65 53 74 | 72 75 63 74 75 72 65 28 |tShapeSt|ructure(|
|000030e0| 74 68 65 53 68 61 70 65 | 2c 20 26 73 69 7a 65 29 |theShape|, &size)|
|000030f0| 3b 09 09 09 2f 2f 47 65 | 74 20 61 20 70 6f 69 6e |;...//Ge|t a poin|
|00003100| 74 65 72 20 74 6f 20 74 | 68 65 20 73 74 72 75 63 |ter to t|he struc|
|00003110| 74 75 72 65 2e 0d 09 09 | 63 68 65 63 6b 28 69 6e |ture....|check(in|
|00003120| 50 6f 6c 79 67 6f 6e 29 | 3b 0d 09 09 0d 09 09 6e |Polygon)|;......n|
|00003130| 43 6f 6e 74 6f 75 72 73 | 20 3d 20 28 28 67 78 50 |Contours| = ((gxP|
|00003140| 6f 6c 79 67 6f 6e 73 2a | 29 69 6e 50 6f 6c 79 67 |olygons*|)inPolyg|
|00003150| 6f 6e 29 2d 3e 63 6f 6e | 74 6f 75 72 73 3b 09 09 |on)->con|tours;..|
|00003160| 09 09 09 09 09 2f 2f 47 | 65 74 20 74 68 65 20 6e |.....//G|et the n|
|00003170| 75 6d 62 65 72 20 6f 66 | 20 63 6f 75 6e 74 6f 75 |umber of| countou|
|00003180| 72 73 2e 0d 0d 09 09 69 | 6e 50 6f 6c 79 67 6f 6e |rs.....i|nPolygon|
|00003190| 20 2b 3d 20 73 69 7a 65 | 6f 66 28 6c 6f 6e 67 29 | += size|of(long)|
|000031a0| 3b 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |;.......|........|
|000031b0| 09 09 2f 2f 4d 6f 76 65 | 20 70 6f 69 6e 74 65 72 |..//Move| pointer|
|000031c0| 20 70 61 73 74 20 63 6f | 6e 74 6f 75 72 73 20 66 | past co|ntours f|
|000031d0| 69 65 6c 64 2e 0d 09 09 | 09 09 0d 09 09 2f 2a 2a |ield....|...../**|
|000031e0| 20 4e 6f 77 20 6f 75 74 | 70 75 74 20 61 6c 6c 20 | Now out|put all |
|000031f0| 6f 66 20 74 68 65 20 63 | 6f 6e 74 6f 75 72 73 20 |of the c|ontours |
|00003200| 2a 2a 2f 0d 09 09 09 09 | 0d 09 09 66 6f 72 20 28 |**/.....|...for (|
|00003210| 69 20 3d 20 30 3b 20 69 | 20 3c 20 6e 43 6f 6e 74 |i = 0; i| < nCont|
|00003220| 6f 75 72 73 3b 20 69 2b | 2b 29 20 7b 09 09 2f 2f |ours; i+|+) {..//|
|00003230| 20 4f 75 74 70 75 74 20 | 74 68 65 20 63 6f 6e 74 | Output |the cont|
|00003240| 6f 75 72 73 2e 0d 09 09 | 0d 09 09 09 6e 50 6f 69 |ours....|....nPoi|
|00003250| 6e 74 73 20 3d 20 2a 28 | 6c 6f 6e 67 2a 29 69 6e |nts = *(|long*)in|
|00003260| 50 6f 6c 79 67 6f 6e 3b | 09 09 09 09 09 09 09 09 |Polygon;|........|
|00003270| 09 09 2f 2f 20 47 65 74 | 20 74 68 65 20 6e 75 6d |..// Get| the num|
|00003280| 62 65 72 20 6f 66 20 70 | 6f 69 6e 74 73 20 66 6f |ber of p|oints fo|
|00003290| 72 20 74 68 69 73 20 63 | 6f 6e 74 6f 75 72 2e 0d |r this c|ontour..|
|000032a0| 09 09 09 0d 09 09 09 69 | 6e 50 6f 6c 79 67 6f 6e |.......i|nPolygon|
|000032b0| 20 2b 3d 20 73 69 7a 65 | 6f 66 28 6c 6f 6e 67 29 | += size|of(long)|
|000032c0| 3b 09 09 09 09 09 09 09 | 09 09 09 09 2f 2f 20 4d |;.......|....// M|
|000032d0| 6f 76 65 20 74 6f 20 74 | 68 65 20 64 61 74 61 2e |ove to t|he data.|
|000032e0| 0d 09 09 09 0d 09 09 09 | 69 66 20 28 6e 50 6f 69 |........|if (nPoi|
|000032f0| 6e 74 73 20 3e 20 30 29 | 20 7b 0d 09 09 09 0d 09 |nts > 0)| {......|
|00003300| 09 09 09 70 50 6f 69 6e | 74 20 3d 20 28 67 78 50 |...pPoin|t = (gxP|
|00003310| 6f 69 6e 74 2a 29 69 6e | 50 6f 6c 79 67 6f 6e 3b |oint*)in|Polygon;|
|00003320| 09 09 09 09 09 09 09 09 | 09 09 2f 2f 20 47 65 74 |........|..// Get|
|00003330| 20 74 68 65 20 66 69 72 | 73 74 20 70 6f 69 6e 74 | the fir|st point|
|00003340| 20 69 6e 20 63 6f 6e 74 | 6f 75 72 2e 0d 09 09 09 | in cont|our.....|
|00003350| 09 69 6e 50 6f 6c 79 67 | 6f 6e 20 2b 3d 20 73 69 |.inPolyg|on += si|
|00003360| 7a 65 6f 66 28 67 78 50 | 6f 69 6e 74 29 3b 09 09 |zeof(gxP|oint);..|
|00003370| 09 09 09 09 09 09 09 09 | 2f 2f 20 4d 6f 76 65 20 |........|// Move |
|00003380| 70 61 73 74 20 69 74 2e | 0d 09 09 09 09 0d 09 09 |past it.|........|
|00003390| 09 09 73 74 61 74 75 73 | 20 3d 20 28 2a 44 6f 4d |..status| = (*DoM|
|000033a0| 6f 76 65 74 6f 29 28 20 | 70 50 6f 69 6e 74 2c 20 |oveto)( |pPoint, |
|000033b0| 72 65 66 63 6f 6e 29 3b | 09 09 09 09 09 2f 2f 20 |refcon);|.....// |
|000033c0| 44 6f 20 74 68 65 20 6d | 6f 76 65 74 6f 0d 09 09 |Do the m|oveto...|
|000033d0| 09 09 6e 72 65 71 75 69 | 72 65 28 73 74 61 74 75 |..nrequi|re(statu|
|000033e0| 73 2c 20 66 61 69 6c 65 | 64 5f 4f 75 74 70 75 74 |s, faile|d_Output|
|000033f0| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |);......|........|
|00003400| 09 09 0d 09 09 09 09 66 | 6f 72 20 28 6a 20 3d 20 |.......f|or (j = |
|00003410| 31 3b 20 6a 20 3c 20 6e | 50 6f 69 6e 74 73 3b 20 |1; j < n|Points; |
|00003420| 6a 2b 2b 29 20 7b 09 09 | 09 09 09 09 09 09 09 2f |j++) {..|......./|
|00003430| 2f 20 4f 75 74 70 75 74 | 20 74 68 65 20 70 6f 69 |/ Output| the poi|
|00003440| 6e 74 73 20 66 6f 72 20 | 74 68 65 20 63 6f 75 6e |nts for |the coun|
|00003450| 74 6f 75 72 2e 0d 09 09 | 09 09 09 09 09 0d 09 09 |tour....|........|
|00003460| 09 09 09 70 50 6f 69 6e | 74 20 3d 20 28 67 78 50 |...pPoin|t = (gxP|
|00003470| 6f 69 6e 74 2a 29 69 6e | 50 6f 6c 79 67 6f 6e 3b |oint*)in|Polygon;|
|00003480| 09 09 09 09 09 09 09 09 | 09 2f 2f 09 09 47 65 74 |........|.//..Get|
|00003490| 20 74 68 65 20 6e 65 78 | 74 20 70 6f 69 6e 74 2e | the nex|t point.|
|000034a0| 0d 09 09 09 09 09 69 6e | 50 6f 6c 79 67 6f 6e 20 |......in|Polygon |
|000034b0| 2b 3d 20 73 69 7a 65 6f | 66 28 67 78 50 6f 69 6e |+= sizeo|f(gxPoin|
|000034c0| 74 29 3b 0d 09 09 09 09 | 09 09 09 09 09 0d 09 09 |t);.....|........|
|000034d0| 09 09 09 73 74 61 74 75 | 73 20 3d 20 28 2a 44 6f |...statu|s = (*Do|
|000034e0| 4c 69 6e 65 74 6f 29 28 | 20 70 50 6f 69 6e 74 2c |Lineto)(| pPoint,|
|000034f0| 20 72 65 66 63 6f 6e 29 | 3b 09 09 09 2f 2f 09 09 | refcon)|;...//..|
|00003500| 41 64 64 20 61 20 6c 69 | 6e 65 20 74 6f 20 74 68 |Add a li|ne to th|
|00003510| 65 20 50 53 20 70 61 74 | 68 2e 0d 09 09 09 09 09 |e PS pat|h.......|
|00003520| 6e 72 65 71 75 69 72 65 | 28 73 74 61 74 75 73 2c |nrequire|(status,|
|00003530| 20 66 61 69 6c 65 64 5f | 4f 75 74 70 75 74 29 3b | failed_|Output);|
|00003540| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 0d |........|........|
|00003550| 09 09 09 09 7d 2f 2f 65 | 6e 64 20 66 6f 72 20 6a |....}//e|nd for j|
|00003560| 0d 09 09 09 09 0d 09 09 | 09 09 69 66 20 28 63 6c |........|..if (cl|
|00003570| 6f 73 65 49 74 29 20 7b | 0d 09 09 09 09 0d 09 09 |oseIt) {|........|
|00003580| 09 09 09 73 74 61 74 75 | 73 20 3d 20 28 2a 44 6f |...statu|s = (*Do|
|00003590| 43 6c 6f 73 65 70 61 74 | 68 29 28 72 65 66 63 6f |Closepat|h)(refco|
|000035a0| 6e 29 3b 0d 09 09 09 09 | 09 6e 72 65 71 75 69 72 |n);.....|.nrequir|
|000035b0| 65 28 73 74 61 74 75 73 | 2c 20 66 61 69 6c 65 64 |e(status|, failed|
|000035c0| 5f 4f 75 74 70 75 74 29 | 3b 0d 09 09 09 09 09 0d |_Output)|;.......|
|000035d0| 09 09 09 09 7d 2f 2f 65 | 6e 64 20 69 66 0d 09 09 |....}//e|nd if...|
|000035e0| 09 09 0d 09 09 09 7d 2f | 2f 65 6e 64 20 66 6f 72 |......}/|/end for|
|000035f0| 0d 09 09 0d 09 09 7d 2f | 2f 65 6e 64 6f 20 66 6f |......}/|/endo fo|
|00003600| 72 20 69 0d 09 09 0d 0d | 66 61 69 6c 65 64 5f 4f |r i.....|failed_O|
|00003610| 75 74 70 75 74 3a 0d 09 | 09 2f 2a 2a 20 52 65 73 |utput:..|./** Res|
|00003620| 74 6f 72 65 20 74 68 65 | 20 73 68 61 70 65 20 74 |tore the| shape t|
|00003630| 6f 20 74 68 65 20 77 61 | 79 20 77 65 20 67 6f 74 |o the wa|y we got|
|00003640| 20 69 74 2e 20 2a 2a 2f | 0d 09 09 0d 09 09 47 58 | it. **/|......GX|
|00003650| 53 65 74 53 68 61 70 65 | 41 74 74 72 69 62 75 74 |SetShape|Attribut|
|00003660| 65 73 28 74 68 65 53 68 | 61 70 65 2c 20 74 68 65 |es(theSh|ape, the|
|00003670| 41 74 74 72 69 62 75 74 | 65 73 29 3b 0d 09 09 47 |Attribut|es);...G|
|00003680| 58 55 6e 6c 6f 63 6b 53 | 68 61 70 65 28 74 68 65 |XUnlockS|hape(the|
|00003690| 53 68 61 70 65 29 3b 0d | 0d 66 61 69 6c 65 64 5f |Shape);.|.failed_|
|000036a0| 4b 65 65 70 44 69 72 65 | 63 74 3a 09 09 0d 09 09 |KeepDire|ct:.....|
|000036b0| 0d 09 09 72 65 74 75 72 | 6e 28 73 74 61 74 75 73 |...retur|n(status|
|000036c0| 29 3b 0d 09 0d 09 7d 2f | 2f 50 6f 6c 79 67 6f 6e |);....}/|/Polygon|
|000036d0| 57 61 6c 6b 65 72 0d 0d | 0d 0d 2f 2a 2a 2a 2a 2a |Walker..|../*****|
|000036e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000036f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003700| 2a 0d 0d 0d 09 53 68 61 | 70 65 57 61 6c 6b 65 72 |*....Sha|peWalker|
|00003710| 3a 0d 09 0d 09 20 09 4d | 61 69 6e 20 65 6e 74 72 |:.... .M|ain entr|
|00003720| 79 20 70 6f 69 6e 74 20 | 66 6f 72 20 70 61 74 68 |y point |for path|
|00003730| 2f 70 6f 6c 79 67 6f 6e | 20 74 72 61 76 65 72 73 |/polygon| travers|
|00003740| 61 6c 2e 0d 0d 09 09 72 | 65 74 75 72 6e 20 72 65 |al.....r|eturn re|
|00003750| 73 75 6c 74 3a 0d 09 09 | 09 74 72 75 65 20 69 66 |sult:...|.true if|
|00003760| 20 73 68 61 70 65 20 77 | 61 6c 6b 69 6e 67 20 74 | shape w|alking t|
|00003770| 65 72 6d 69 6e 61 74 65 | 64 20 62 65 66 6f 72 65 |erminate|d before|
|00003780| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 20 6f 66 20 65 | complet|ion of e|
|00003790| 6e 74 69 72 65 20 73 68 | 61 70 65 2c 20 62 79 20 |ntire sh|ape, by |
|000037a0| 6f 6e 65 20 6f 66 20 74 | 68 65 20 63 61 6c 6c 62 |one of t|he callb|
|000037b0| 61 63 6b 73 2e 0d 0d 2a | 2a 2a 2a 2a 2a 2a 2a 2a |acks...*|********|
|000037c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000037d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 42 |********|*****/.B|
|000037e0| 6f 6f 6c 65 61 6e 20 20 | 53 68 61 70 65 57 61 6c |oolean |ShapeWal|
|000037f0| 6b 65 72 28 67 78 53 68 | 61 70 65 20 74 68 65 53 |ker(gxSh|ape theS|
|00003800| 68 61 70 65 2c 20 09 54 | 70 77 4d 6f 76 65 74 6f |hape, .T|pwMoveto|
|00003810| 50 72 6f 63 20 44 6f 4d | 6f 76 65 74 6f 2c 20 54 |Proc DoM|oveto, T|
|00003820| 70 77 4c 69 6e 65 74 6f | 50 72 6f 63 20 44 6f 4c |pwLineto|Proc DoL|
|00003830| 69 6e 65 74 6f 2c 20 54 | 70 77 43 75 72 76 65 74 |ineto, T|pwCurvet|
|00003840| 6f 50 72 6f 63 20 44 6f | 43 75 72 76 65 74 6f 2c |oProc Do|Curveto,|
|00003850| 20 54 70 77 43 6c 6f 73 | 65 70 61 74 68 50 72 6f | TpwClos|epathPro|
|00003860| 63 20 44 6f 43 6c 6f 73 | 65 70 61 74 68 2c 09 76 |c DoClos|epath,.v|
|00003870| 6f 69 64 2a 20 72 65 66 | 63 6f 6e 29 0d 09 7b 0d |oid* ref|con)..{.|
|00003880| 09 09 42 6f 6f 6c 65 61 | 6e 20 09 09 09 72 65 73 |..Boolea|n ...res|
|00003890| 75 6c 74 20 3d 20 74 72 | 75 65 3b 0d 09 09 67 78 |ult = tr|ue;...gx|
|000038a0| 53 68 61 70 65 54 79 70 | 65 09 09 74 68 65 54 79 |ShapeTyp|e..theTy|
|000038b0| 70 65 20 3d 20 47 58 47 | 65 74 53 68 61 70 65 54 |pe = GXG|etShapeT|
|000038c0| 79 70 65 28 74 68 65 53 | 68 61 70 65 29 3b 0d 09 |ype(theS|hape);..|
|000038d0| 09 67 78 53 68 61 70 65 | 09 09 09 09 74 65 6d 70 |.gxShape|....temp|
|000038e0| 20 3d 20 74 68 65 53 68 | 61 70 65 3b 0d 09 0d 09 | = theSh|ape;....|
|000038f0| 09 73 77 69 74 63 68 28 | 74 68 65 54 79 70 65 29 |.switch(|theType)|
|00003900| 20 7b 0d 0d 09 09 09 2f | 2a 20 63 75 72 76 65 20 | {...../|* curve |
|00003910| 73 68 61 70 65 73 20 67 | 65 74 20 63 6f 70 69 65 |shapes g|et copie|
|00003920| 64 20 61 6e 64 20 74 75 | 72 6e 65 64 20 69 6e 74 |d and tu|rned int|
|00003930| 6f 20 70 61 74 68 73 20 | 2a 2f 0d 0d 09 09 09 63 |o paths |*/.....c|
|00003940| 61 73 65 20 67 78 43 75 | 72 76 65 54 79 70 65 3a |ase gxCu|rveType:|
|00003950| 0d 0d 09 09 09 09 74 65 | 6d 70 20 3d 20 47 58 43 |......te|mp = GXC|
|00003960| 6f 70 79 54 6f 53 68 61 | 70 65 28 6e 69 6c 2c 20 |opyToSha|pe(nil, |
|00003970| 74 68 65 53 68 61 70 65 | 29 3b 0d 09 09 09 09 47 |theShape|);.....G|
|00003980| 58 53 65 74 53 68 61 70 | 65 54 79 70 65 28 74 65 |XSetShap|eType(te|
|00003990| 6d 70 2c 20 67 78 50 61 | 74 68 54 79 70 65 29 3b |mp, gxPa|thType);|
|000039a0| 09 09 0d 0d 09 09 09 63 | 61 73 65 20 67 78 50 61 |.......c|ase gxPa|
|000039b0| 74 68 54 79 70 65 3a 0d | 09 09 09 09 72 65 73 75 |thType:.|....resu|
|000039c0| 6c 74 20 3d 20 50 61 74 | 68 57 61 6c 6b 65 72 28 |lt = Pat|hWalker(|
|000039d0| 74 65 6d 70 2c 20 44 6f | 4d 6f 76 65 74 6f 2c 20 |temp, Do|Moveto, |
|000039e0| 44 6f 4c 69 6e 65 74 6f | 2c 20 44 6f 43 75 72 76 |DoLineto|, DoCurv|
|000039f0| 65 74 6f 2c 20 44 6f 43 | 6c 6f 73 65 70 61 74 68 |eto, DoC|losepath|
|00003a00| 2c 20 72 65 66 63 6f 6e | 29 3b 0d 09 09 09 09 62 |, refcon|);.....b|
|00003a10| 72 65 61 6b 3b 0d 0d 09 | 09 09 2f 2a 20 6c 69 6e |reak;...|../* lin|
|00003a20| 65 73 20 61 6e 64 20 72 | 65 63 74 61 6e 67 6c 65 |es and r|ectangle|
|00003a30| 73 20 67 65 74 20 63 6f | 70 69 65 64 20 61 6e 64 |s get co|pied and|
|00003a40| 20 74 75 72 6e 65 64 20 | 69 6e 74 6f 20 70 6f 6c | turned |into pol|
|00003a50| 79 67 6f 6e 73 20 2a 2f | 0d 09 09 09 0d 09 09 09 |ygons */|........|
|00003a60| 63 61 73 65 20 67 78 4c | 69 6e 65 54 79 70 65 3a |case gxL|ineType:|
|00003a70| 0d 09 09 09 63 61 73 65 | 20 67 78 52 65 63 74 61 |....case| gxRecta|
|00003a80| 6e 67 6c 65 54 79 70 65 | 3a 0d 0d 09 09 09 09 74 |ngleType|:......t|
|00003a90| 65 6d 70 20 3d 20 47 58 | 43 6f 70 79 54 6f 53 68 |emp = GX|CopyToSh|
|00003aa0| 61 70 65 28 6e 69 6c 2c | 20 74 68 65 53 68 61 70 |ape(nil,| theShap|
|00003ab0| 65 29 3b 0d 09 09 09 09 | 47 58 53 65 74 53 68 61 |e);.....|GXSetSha|
|00003ac0| 70 65 54 79 70 65 28 74 | 65 6d 70 2c 20 67 78 50 |peType(t|emp, gxP|
|00003ad0| 6f 6c 79 67 6f 6e 54 79 | 70 65 29 3b 09 09 0d 0d |olygonTy|pe);....|
|00003ae0| 09 09 09 63 61 73 65 20 | 67 78 50 6f 6c 79 67 6f |...case |gxPolygo|
|00003af0| 6e 54 79 70 65 3a 0d 09 | 09 09 09 72 65 73 75 6c |nType:..|...resul|
|00003b00| 74 20 3d 20 50 6f 6c 79 | 67 6f 6e 57 61 6c 6b 65 |t = Poly|gonWalke|
|00003b10| 72 28 74 65 6d 70 2c 20 | 44 6f 4d 6f 76 65 74 6f |r(temp, |DoMoveto|
|00003b20| 2c 20 44 6f 4c 69 6e 65 | 74 6f 2c 20 44 6f 43 6c |, DoLine|to, DoCl|
|00003b30| 6f 73 65 70 61 74 68 2c | 20 72 65 66 63 6f 6e 29 |osepath,| refcon)|
|00003b40| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00003b50| 09 0d 09 09 09 64 65 66 | 61 75 6c 74 3a 0d 09 09 |.....def|ault:...|
|00003b60| 09 09 47 58 50 6f 73 74 | 47 72 61 70 68 69 63 73 |..GXPost|Graphics|
|00003b70| 45 72 72 6f 72 28 69 6c | 6c 65 67 61 6c 5f 74 79 |Error(il|legal_ty|
|00003b80| 70 65 5f 66 6f 72 5f 73 | 68 61 70 65 29 3b 0d 09 |pe_for_s|hape);..|
|00003b90| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 0d 09 09 7d |...break|;......}|
|00003ba0| 2f 2f 65 6e 64 20 73 77 | 69 74 63 68 0d 09 09 0d |//end sw|itch....|
|00003bb0| 09 09 2f 2a 20 69 66 20 | 77 65 20 6d 61 64 65 20 |../* if |we made |
|00003bc0| 61 20 74 65 6d 70 6f 72 | 61 72 79 20 63 6f 70 79 |a tempor|ary copy|
|00003bd0| 2c 20 64 69 73 70 6f 73 | 65 20 6f 66 20 69 74 2e |, dispos|e of it.|
|00003be0| 20 2a 2f 0d 09 09 0d 09 | 09 69 66 20 28 74 65 6d | */.....|.if (tem|
|00003bf0| 70 20 21 3d 20 74 68 65 | 53 68 61 70 65 29 0d 09 |p != the|Shape)..|
|00003c00| 09 09 47 58 44 69 73 70 | 6f 73 65 53 68 61 70 65 |..GXDisp|oseShape|
|00003c10| 28 74 65 6d 70 29 3b 0d | 09 0d 09 09 72 65 74 75 |(temp);.|....retu|
|00003c20| 72 6e 28 72 65 73 75 6c | 74 29 3b 0d 09 09 0d 09 |rn(resul|t);.....|
|00003c30| 7d 2f 2f 53 68 61 70 65 | 57 61 6c 6b 65 72 0d 0d |}//Shape|Walker..|
|00003c40| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c80| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00003c90| 00 00 0e 07 0a 57 6f 72 | 6b 69 6e 67 53 65 74 00 |.....Wor|kingSet.|
|00003ca0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 00 00 00 00 |....TEXT|MPS ....|
|00003cb0| 0d 50 61 74 68 57 61 6c | 6b 69 6e 67 2e 63 02 00 |.PathWal|king.c..|
|00003cc0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 00 00 00 |..TEXTCW|IE......|
|00003cd0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 00 00 00 |..TEXTCW|IE......|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 00 00 ad 99 35 88 00 00 | 3b c1 00 00 01 9a 00 00 |....5...|;.......|
|00003d00| 00 00 00 00 00 00 06 00 | 00 00 0e 0f 00 4d 04 00 |........|.....M..|
|00003d10| 00 00 00 00 00 00 00 00 | 00 00 0e 07 07 4d 61 6b |........|.....Mak|
|00003d20| 65 4f 75 74 00 00 00 00 | 00 00 00 00 00 00 00 00 |eOut....|........|
|00003d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 06 00 00 00 |........|........|
|00003d40| 0e ba 00 4e 03 00 00 00 | 00 00 00 00 00 00 00 00 |...N....|........|
|00003d50| 05 66 09 4e 52 53 6f 75 | 72 63 65 73 00 00 00 00 |.f.NRSou|rces....|
|00003d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d70| 00 00 10 00 00 00 0e ba | 0a 32 44 47 72 61 70 68 |........|.2DGraph|
|00003d80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00003d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003da0| 00 00 00 00 00 00 00 03 | 00 02 00 3e 00 04 01 cd |........|...>....|
|00003db0| 02 63 00 3e 00 04 01 cd | 02 63 ad c8 94 68 00 00 |.c.>....|.c...h..|
|00003dc0| 2e ec 00 00 2e ec 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00003dd0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00003de0| 00 00 00 46 00 54 6f 0c | 26 ee 00 00 00 1c 00 46 |...F.To.|&......F|
|00003df0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00003e00| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00003e10| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00003e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+